All of lore.kernel.org
 help / color / mirror / Atom feed
From: Elazar Leibovich <elazar.leibovich@ravellosystems.com>
To: sahil aggarwal <sahil.agg15@gmail.com>, linux-perf-users@vger.kernel.org
Subject: Fwd: perf smapling
Date: Tue, 31 Mar 2015 17:15:04 +0300	[thread overview]
Message-ID: <CAL2Y34CxT=YRGx6G0kcCWK0AVnaPdb4ybL+u-BiUE7gYg1jYGg@mail.gmail.com> (raw)
In-Reply-To: <CAL2Y34A=Fk03_LSTM_SHwVaE4NaKSD=zZt0vWtzn3Rm9dQtDLQ@mail.gmail.com>

I wanted to ensure the user always see contiguous array of data from
the ring buffer.

The last piece of data, say "abcde" could wrap around in the ring
buffer and appear like:

[de...                 ...abc]

I wanted the user to see a contigious array of the form [abcde].

So in the case I'm having input that wrap around, I'll simply copy it
to the first buffer

[wrap_buffer][de..                 ...abc]
would become
[               abc][de...               ...abc]

And then I'll the user pointer to the leftmost "a", and he'll see
"abcde" without knowing he's handling a ring buffer.

Let me know if I was clear enough.

On Tue, Mar 31, 2015 at 2:18 PM, sahil aggarwal <sahil.agg15@gmail.com> wrote:
>
> Hi Elazar
>
> Can you help me understand why you have used
> mmap_pages->wrap_base.? And, instead of allocating
> (2^n)+1 pages you allocate (2^n)+2 pages, why so.?
> wrap_base points to (2^n)+2 pages and base points to
> (2^n)+1 pages, what is use of wrap_base.? I tried reading
> perf source too, there it seems they use (2^n)+1 pages only.
>
>
> Thanks
> Regards

  parent reply	other threads:[~2015-03-31 14:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-29  5:54 perf smapling sahil aggarwal
2015-03-29  6:22 ` Elazar Leibovich
2015-03-30 17:38 ` Andi Kleen
     [not found] ` <CAL2Y34Bi+VLSvGucN8J=4RXKh785Lg9BYAa4LUU_yCMR7COTgQ@mail.gmail.com>
     [not found]   ` <20150331111813.GA1152@ubuntu>
     [not found]     ` <CAL2Y34A=Fk03_LSTM_SHwVaE4NaKSD=zZt0vWtzn3Rm9dQtDLQ@mail.gmail.com>
2015-03-31 14:15       ` Elazar Leibovich [this message]
2015-03-31 15:10         ` sahil aggarwal
2015-03-31 15:22           ` sahil aggarwal
2015-03-31 18:07             ` Elazar Leibovich
2015-04-01  9:22               ` sahil aggarwal
2015-04-01  9:58                 ` Elazar Leibovich
     [not found]                 ` <CAL2Y34Amk49Upd8+eCmEK9WqG6SGgEJfj3tUXdrRKEa_6Hxr8Q@mail.gmail.com>
2015-04-01 10:04                   ` sahil aggarwal
2015-04-01 11:49                     ` sahil aggarwal
2015-04-01 11:54                       ` sahil aggarwal
2015-04-01 18:50                       ` Elazar Leibovich
2015-04-02 13:30                         ` sahil aggarwal
2015-04-03  5:34                           ` sahil aggarwal
2015-04-08  6:08                             ` sahil aggarwal
2015-04-08  6:41                               ` sahil aggarwal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAL2Y34CxT=YRGx6G0kcCWK0AVnaPdb4ybL+u-BiUE7gYg1jYGg@mail.gmail.com' \
    --to=elazar.leibovich@ravellosystems.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=sahil.agg15@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.