21 Dec, 2011

1 commit

  • This event counts the number of reference core cpu cycles.
    Reference means that the event increments at a constant rate which
    is not subject to core CPU frequency adjustments. The event may
    not count when the processor is in halted (low power) state.
    As such, it may not be equivalent to wall clock time. However,
    when the processor is not halted state, the event keeps
    a constant correlation with wall clock time.

    Signed-off-by: Stephane Eranian
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1323559734-3488-3-git-send-email-eranian@google.com
    Signed-off-by: Ingo Molnar

    Stephane Eranian
     

06 Dec, 2011

2 commits

  • jump_lable patching is very expensive operation that involves pausing all
    cpus. The patching of perf_sched_events jump_label is easily controllable
    from userspace by unprivileged user.

    When te user runs a loop like this:

    "while true; do perf stat -e cycles true; done"

    ... the performance of my test application that just increments a counter
    for one second drops by 4%.

    This is on a 16 cpu box with my test application using only one of
    them. An impact on a real server doing real work will be worse.

    Performance of KVM PMU drops nearly 50% due to jump_lable for "perf
    record" since KVM PMU implementation creates and destroys perf event
    frequently.

    This patch introduces a way to rate limit jump_label patching and uses
    it to fix the above problem.

    I believe that as jump_label use will spread the problem will become more
    common and thus solving it in a generic code is appropriate. Also fixing
    it in the perf code would result in moving jump_label accounting logic to
    perf code with all the ifdefs in case of JUMP_LABEL=n kernel. With this
    patch all details are nicely hidden inside jump_label code.

    Signed-off-by: Gleb Natapov
    Acked-by: Jason Baron
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20111127155909.GO2557@redhat.com
    Signed-off-by: Ingo Molnar

    Gleb Natapov
     
  • Gleb writes:

    > Currently pmu is disabled and re-enabled on each timer interrupt even
    > when no rotation or frequency adjustment is needed. On Intel CPU this
    > results in two writes into PERF_GLOBAL_CTRL MSR per tick. On bare metal
    > it does not cause significant slowdown, but when running perf in a virtual
    > machine it leads to 20% slowdown on my machine.

    Cure this by keeping a perf_event_context::nr_freq counter that counts the
    number of active events that require frequency adjustments and use this in a
    similar fashion to the already existing nr_events != nr_active test in
    perf_rotate_context().

    By being able to exclude both rotation and frequency adjustments a-priory for
    the common case we can avoid the otherwise superfluous PMU disable.

    Suggested-by: Gleb Natapov
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/n/tip-515yhoatehd3gza7we9fapaa@git.kernel.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

05 Dec, 2011

1 commit

  • When you do:
    $ perf record -e cycles,cycles,cycles noploop 10

    You expect about 10,000 samples for each event, i.e., 10s at
    1000samples/sec. However, this is not what's happening. You
    get much fewer samples, maybe 3700 samples/event:

    $ perf report -D | tail -15
    Aggregated stats:
    TOTAL events: 10998
    MMAP events: 66
    COMM events: 2
    SAMPLE events: 10930
    cycles stats:
    TOTAL events: 3644
    SAMPLE events: 3644
    cycles stats:
    TOTAL events: 3642
    SAMPLE events: 3642
    cycles stats:
    TOTAL events: 3644
    SAMPLE events: 3644

    On a Intel Nehalem or even AMD64, there are 4 counters capable
    of measuring cycles, so there is plenty of space to measure those
    events without multiplexing (even with the NMI watchdog active).
    And even with multiplexing, we'd expect roughly the same number
    of samples per event.

    The root of the problem was that when the event that caused the buffer
    to become full was not the first event passed on the cmdline, the user
    notification would get lost. The notification was sent to the file
    descriptor of the overflowed event but the perf tool was not polling
    on it. The perf tool aggregates all samples into a single buffer,
    i.e., the buffer of the first event. Consequently, it assumes
    notifications for any event will come via that descriptor.

    The seemingly straight forward solution of moving the waitq into the
    ringbuffer object doesn't work because of life-time issues. One could
    perf_event_set_output() on a fd that you're also blocking on and cause
    the old rb object to be freed while its waitq would still be
    referenced by the blocked thread -> FAIL.

    Therefore link all events to the ringbuffer and broadcast the wakeup
    from the ringbuffer object to all possible events that could be waited
    upon. This is rather ugly, and we're open to better solutions but it
    works for now.

    Reported-by: Stephane Eranian
    Finished-by: Stephane Eranian
    Reviewed-by: Stephane Eranian
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20111126014731.GA7030@quad
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

06 Oct, 2011

1 commit

  • The two new attributes exclude_guest and exclude_host can
    bes used by user-space to tell the kernel to setup
    performance counter to either only count while the CPU is in
    guest or in host mode.

    An additional check is also introduced to make sure
    user-space does not try to exclude guest and host mode from
    counting.

    Signed-off-by: Joerg Roedel
    Signed-off-by: Gleb Natapov
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1317816084-18026-2-git-send-email-gleb@redhat.com
    Signed-off-by: Ingo Molnar

    Joerg Roedel
     

29 Aug, 2011

1 commit

  • The current cgroup context switch code was incorrect leading
    to bogus counts. Furthermore, as soon as there was an active
    cgroup event on a CPU, the context switch cost on that CPU
    would increase by a significant amount as demonstrated by a
    simple ping/pong example:

    $ ./pong
    Both processes pinned to CPU1, running for 10s
    10684.51 ctxsw/s

    Now start a cgroup perf stat:
    $ perf stat -e cycles,cycles -A -a -G test -C 1 -- sleep 100

    $ ./pong
    Both processes pinned to CPU1, running for 10s
    6674.61 ctxsw/s

    That's a 37% penalty.

    Note that pong is not even in the monitored cgroup.

    The results shown by perf stat are bogus:
    $ perf stat -e cycles,cycles -A -a -G test -C 1 -- sleep 100

    Performance counter stats for 'sleep 100':

    CPU1 cycles test
    CPU1 16,984,189,138 cycles # 0.000 GHz

    The second 'cycles' event should report a count @ CPU clock
    (here 2.4GHz) as it is counting across all cgroups.

    The patch below fixes the bogus accounting and bypasses any
    cgroup switches in case the outgoing and incoming tasks are
    in the same cgroup.

    With this patch the same test now yields:
    $ ./pong
    Both processes pinned to CPU1, running for 10s
    10775.30 ctxsw/s

    Start perf stat with cgroup:

    $ perf stat -e cycles,cycles -A -a -G test -C 1 -- sleep 10

    Run pong outside the cgroup:
    $ /pong
    Both processes pinned to CPU1, running for 10s
    10687.80 ctxsw/s

    The penalty is now less than 2%.

    And the results for perf stat are correct:

    $ perf stat -e cycles,cycles -A -a -G test -C 1 -- sleep 10

    Performance counter stats for 'sleep 10':

    CPU1 cycles test # 0.000 GHz
    CPU1 23,933,981,448 cycles # 0.000 GHz

    Now perf stat reports the correct counts for
    for the non cgroup event.

    If we run pong inside the cgroup, then we also get the
    correct counts:

    $ perf stat -e cycles,cycles -A -a -G test -C 1 -- sleep 10

    Performance counter stats for 'sleep 10':

    CPU1 22,297,726,205 cycles test # 0.000 GHz
    CPU1 23,933,981,448 cycles # 0.000 GHz

    10.001457237 seconds time elapsed

    Signed-off-by: Stephane Eranian
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20110825135803.GA4697@quad
    Signed-off-by: Ingo Molnar

    Stephane Eranian
     

27 Jul, 2011

1 commit

  • This allows us to move duplicated code in
    (atomic_inc_not_zero() for now) to

    Signed-off-by: Arun Sharma
    Reviewed-by: Eric Dumazet
    Cc: Ingo Molnar
    Cc: David Miller
    Cc: Eric Dumazet
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arun Sharma
     

01 Jul, 2011

7 commits

  • KVM needs one-shot samples, since a PMC programmed to -X will fire after X
    events and then again after 2^40 events (i.e. variable period).

    Signed-off-by: Avi Kivity
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1309362157-6596-4-git-send-email-avi@redhat.com
    Signed-off-by: Ingo Molnar

    Avi Kivity
     
  • The perf_event overflow handler does not receive any caller-derived
    argument, so many callers need to resort to looking up the perf_event
    in their local data structure. This is ugly and doesn't scale if a
    single callback services many perf_events.

    Fix by adding a context parameter to perf_event_create_kernel_counter()
    (and derived hardware breakpoints APIs) and storing it in the perf_event.
    The field can be accessed from the callback as event->overflow_handler_context.
    All callers are updated.

    Signed-off-by: Avi Kivity
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1309362157-6596-2-git-send-email-avi@redhat.com
    Signed-off-by: Ingo Molnar

    Avi Kivity
     
  • Add a NODE level to the generic cache events which is used to measure
    local vs remote memory accesses. Like all other cache events, an
    ACCESS is HIT+MISS, if there is no way to distinguish between reads
    and writes do reads only etc..

    The below needs filling out for !x86 (which I filled out with
    unsupported events).

    I'm fairly sure ARM can leave it like that since it doesn't strike me as
    an architecture that even has NUMA support. SH might have something since
    it does appear to have some NUMA bits.

    Sparc64, PowerPC and MIPS certainly want a good look there since they
    clearly are NUMA capable.

    Signed-off-by: Peter Zijlstra
    Cc: David Miller
    Cc: Anton Blanchard
    Cc: David Daney
    Cc: Deng-Cheng Zhu
    Cc: Paul Mundt
    Cc: Will Deacon
    Cc: Robert Richter
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1303508226.4865.8.camel@laptop
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • This patch improves the code managing the extra shared registers
    used for offcore_response events on Intel Nehalem/Westmere. The
    idea is to use static allocation instead of dynamic allocation.
    This simplifies greatly the get and put constraint routines for
    those events.

    The patch also renames per_core to shared_regs because the same
    data structure gets used whether or not HT is on. When HT is
    off, those events still need to coordination because they use
    a extra MSR that has to be shared within an event group.

    Signed-off-by: Stephane Eranian
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20110606145703.GA7258@quad
    Signed-off-by: Ingo Molnar

    Stephane Eranian
     
  • Since only samples call perf_output_sample() its much saner (and more
    correct) to put the sample logic in there than in the
    perf_output_begin()/perf_output_end() pair.

    Saves a useless argument, reduces conditionals and shrinks
    struct perf_output_handle, win!

    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/n/tip-2crpvsx3cqu67q3zqjbnlpsc@git.kernel.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • The nmi parameter indicated if we could do wakeups from the current
    context, if not, we would set some state and self-IPI and let the
    resulting interrupt do the wakeup.

    For the various event classes:

    - hardware: nmi=0; PMI is in fact an NMI or we run irq_work_run from
    the PMI-tail (ARM etc.)
    - tracepoint: nmi=0; since tracepoint could be from NMI context.
    - software: nmi=[0,1]; some, like the schedule thing cannot
    perform wakeups, and hence need 0.

    As one can see, there is very little nmi=1 usage, and the down-side of
    not using it is that on some platforms some software events can have a
    jiffy delay in wakeup (when arch_irq_work_raise isn't implemented).

    The up-side however is that we can remove the nmi parameter and save a
    bunch of conditionals in fast paths.

    Signed-off-by: Peter Zijlstra
    Cc: Michael Cree
    Cc: Will Deacon
    Cc: Deng-Cheng Zhu
    Cc: Anton Blanchard
    Cc: Eric B Munson
    Cc: Heiko Carstens
    Cc: Paul Mundt
    Cc: David S. Miller
    Cc: Frederic Weisbecker
    Cc: Jason Wessel
    Cc: Don Zickus
    Link: http://lkml.kernel.org/n/tip-agjev8eu666tvknpb3iaj0fg@git.kernel.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Reorder perf_event_context to remove 8 bytes of 64 bit alignment padding
    shrinking its size to 192 bytes, allowing it to fit into a smaller slab
    and use one fewer cache lines.

    Signed-off-by: Richard Kennedy
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1307460819.1950.5.camel@castor.rsk
    Signed-off-by: Ingo Molnar

    Richard Kennedy
     

16 Jun, 2011

1 commit


09 Jun, 2011

1 commit

  • And create the internal perf events header.

    v2: Keep an internal inlined perf_output_copy()

    Signed-off-by: Frederic Weisbecker
    Acked-by: Peter Zijlstra
    Cc: Borislav Petkov
    Cc: Stephane Eranian
    Cc: Arnaldo Carvalho de Melo
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/1305827704-5607-1-git-send-email-fweisbec@gmail.com
    [ v3: use clearer 'ring_buffer' and 'rb' naming ]
    Signed-off-by: Ingo Molnar

    Frederic Weisbecker
     

04 Jun, 2011

1 commit

  • Fix include/linux/perf_event.h comments to be consistent with
    the actual #define names. This is trivial, but it can be a bit
    confusing when first reading through the file.

    Signed-off-by: Vince Weaver
    Cc: Peter Zijlstra
    Cc: paulus@samba.org
    Cc: Arnaldo Carvalho de Melo
    Cc: Frederic Weisbecker
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/alpine.DEB.2.00.1106031757090.29381@cl320.eecs.utk.edu
    Signed-off-by: Ingo Molnar

    Vince Weaver
     

07 May, 2011

1 commit


04 May, 2011

1 commit


29 Apr, 2011

1 commit

  • Add two generic hardware events: front-end and back-end stalled cycles.

    These events measure conditions when the CPU is executing code but its
    capabilities are not fully utilized. Understanding such situations and
    analyzing them is an important sub-task of code optimization workflows.

    Both events limit performance: most front end stalls tend to be caused
    by branch misprediction or instruction fetch cachemisses, backend
    stalls can be caused by various resource shortages or inefficient
    instruction scheduling.

    Front-end stalls are the more important ones: code cannot run fast
    if the instruction stream is not being kept up.

    An over-utilized back-end can cause front-end stalls and thus
    has to be kept an eye on as well.

    The exact composition is very program logic and instruction mix
    dependent.

    We use the terms 'stall', 'front-end' and 'back-end' loosely and
    try to use the best available events from specific CPUs that
    approximate these concepts.

    Cc: Peter Zijlstra
    Cc: Arnaldo Carvalho de Melo
    Cc: Frederic Weisbecker
    Link: http://lkml.kernel.org/n/tip-7y40wib8n000io7hjpn1dsrm@git.kernel.org
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

27 Apr, 2011

2 commits


08 Apr, 2011

1 commit


05 Apr, 2011

1 commit

  • Introduce:

    static __always_inline bool static_branch(struct jump_label_key *key);

    instead of the old JUMP_LABEL(key, label) macro.

    In this way, jump labels become really easy to use:

    Define:

    struct jump_label_key jump_key;

    Can be used as:

    if (static_branch(&jump_key))
    do unlikely code

    enable/disale via:

    jump_label_inc(&jump_key);
    jump_label_dec(&jump_key);

    that's it!

    For the jump labels disabled case, the static_branch() becomes an
    atomic_read(), and jump_label_inc()/dec() are simply atomic_inc(),
    atomic_dec() operations. We show testing results for this change below.

    Thanks to H. Peter Anvin for suggesting the 'static_branch()' construct.

    Since we now require a 'struct jump_label_key *key', we can store a pointer into
    the jump table addresses. In this way, we can enable/disable jump labels, in
    basically constant time. This change allows us to completely remove the previous
    hashtable scheme. Thanks to Peter Zijlstra for this re-write.

    Testing:

    I ran a series of 'tbench 20' runs 5 times (with reboots) for 3
    configurations, where tracepoints were disabled.

    jump label configured in
    avg: 815.6

    jump label *not* configured in (using atomic reads)
    avg: 800.1

    jump label *not* configured in (regular reads)
    avg: 803.4

    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Jason Baron
    Suggested-by: H. Peter Anvin
    Tested-by: David Daney
    Acked-by: Ralf Baechle
    Acked-by: David S. Miller
    Acked-by: Mathieu Desnoyers
    Signed-off-by: Steven Rostedt

    Jason Baron
     

31 Mar, 2011

2 commits

  • Fixes generated by 'codespell' and manually reviewed.

    Signed-off-by: Lucas De Marchi

    Lucas De Marchi
     
  • Jiri reported:

    |
    | - once an event is created by sys_perf_event_open, task context
    | is created and it stays even if the event is closed, until the
    | task is finished ... thats what I see in code and I assume it's
    | correct
    |
    | - when the task opens event, perf_sched_events jump label is
    | incremented and following callbacks are started from scheduler
    |
    | __perf_event_task_sched_in
    | __perf_event_task_sched_out
    |
    | These callback *in/out set/unset cpuctx->task_ctx value to the
    | task context.
    |
    | - close is called on event on CPU 0:
    | - the task is scheduled on CPU 0
    | - __perf_event_task_sched_in is called
    | - cpuctx->task_ctx is set
    | - perf_sched_events jump label is decremented and == 0
    | - __perf_event_task_sched_out is not called
    | - cpuctx->task_ctx on CPU 0 stays set
    |
    | - exit is called on CPU 1:
    | - the task is scheduled on CPU 1
    | - perf_event_exit_task is called
    | - task_ctx_sched_out unsets cpuctx->task_ctx on CPU 1
    | - put_ctx destroys the context
    |
    | - another call of perf_rotate_context on CPU 0 will use invalid
    | task_ctx pointer, and eventualy panic.
    |

    Cure this the simplest possibly way by partially reverting the
    jump_label optimization for the sched_out case.

    Reported-and-tested-by: Jiri Olsa
    Signed-off-by: Peter Zijlstra
    Cc: Oleg Nesterov
    Cc: # .37+
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

23 Mar, 2011

1 commit

  • This patch solves a stale pointer problem in
    update_cgrp_time_from_cpuctx(). The cpuctx->cgrp
    was not cleared on all possible event exit paths,
    including:

    close()
    perf_release()
    perf_release_kernel()
    list_del_event()

    This patch fixes list_del_event() to clear cpuctx->cgrp
    when there are no cgroup events left in the context.

    [ This second version makes the code compile when
    CONFIG_CGROUP_PERF is not enabled. We unconditionally define
    perf_cpu_context->cgrp. ]

    Signed-off-by: Stephane Eranian
    Cc: peterz@infradead.org
    Cc: perfmon2-devel@lists.sf.net
    Cc: paulus@samba.org
    Cc: davem@davemloft.net
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Stephane Eranian
     

16 Mar, 2011

1 commit


04 Mar, 2011

1 commit

  • Change logs against Andi's original version:

    - Extends perf_event_attr:config to config{,1,2} (Peter Zijlstra)
    - Fixed a major event scheduling issue. There cannot be a ref++ on an
    event that has already done ref++ once and without calling
    put_constraint() in between. (Stephane Eranian)
    - Use thread_cpumask for percore allocation. (Lin Ming)
    - Use MSR names in the extra reg lists. (Lin Ming)
    - Remove redundant "c = NULL" in intel_percore_constraints
    - Fix comment of perf_event_attr::config1

    Intel Nehalem/Westmere have a special OFFCORE_RESPONSE event
    that can be used to monitor any offcore accesses from a core.
    This is a very useful event for various tunings, and it's
    also needed to implement the generic LLC-* events correctly.

    Unfortunately this event requires programming a mask in a separate
    register. And worse this separate register is per core, not per
    CPU thread.

    This patch:

    - Teaches perf_events that OFFCORE_RESPONSE needs extra parameters.
    The extra parameters are passed by user space in the
    perf_event_attr::config1 field.

    - Adds support to the Intel perf_event core to schedule per
    core resources. This adds fairly generic infrastructure that
    can be also used for other per core resources.
    The basic code has is patterned after the similar AMD northbridge
    constraints code.

    Thanks to Stephane Eranian who pointed out some problems
    in the original version and suggested improvements.

    Signed-off-by: Andi Kleen
    Signed-off-by: Lin Ming
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Andi Kleen
     

16 Feb, 2011

2 commits

  • By pre-computing the maximum number of samples per tick we can avoid a
    multiplication and a conditional since MAX_INTERRUPTS >
    max_samples_per_tick.

    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • This kernel patch adds the ability to filter monitoring based on
    container groups (cgroups). This is for use in per-cpu mode only.

    The cgroup to monitor is passed as a file descriptor in the pid
    argument to the syscall. The file descriptor must be opened to
    the cgroup name in the cgroup filesystem. For instance, if the
    cgroup name is foo and cgroupfs is mounted in /cgroup, then the
    file descriptor is opened to /cgroup/foo. Cgroup mode is
    activated by passing PERF_FLAG_PID_CGROUP in the flags argument
    to the syscall.

    For instance to measure in cgroup foo on CPU1 assuming
    cgroupfs is mounted under /cgroup:

    struct perf_event_attr attr;
    int cgroup_fd, fd;

    cgroup_fd = open("/cgroup/foo", O_RDONLY);
    fd = perf_event_open(&attr, cgroup_fd, 1, -1, PERF_FLAG_PID_CGROUP);
    close(cgroup_fd);

    Signed-off-by: Stephane Eranian
    [ added perf_cgroup_{exit,attach} ]
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Stephane Eranian
     

16 Dec, 2010

3 commits

  • Simple sysfs emumeration of the PMUs.

    Use a "event_source" bus, and add PMU devices using their name.

    Each PMU device has a type attribute which contrains the value needed
    for perf_event_attr::type to identify this PMU.

    This is the minimal stub needed to start using this interface,
    we'll consider extending the sysfs usage later.

    Cc: Kay Sievers
    Cc: Greg KH
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Extend the perf_pmu_register() interface to allow for named and
    dynamic pmu types.

    Because we need to support the existing static types we cannot use
    dynamic types for everything, hence provide a type argument.

    If we want to enumerate the PMUs they need a name, provide one.

    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Merge reason: We want to apply a dependent patch.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

09 Dec, 2010

1 commit


05 Dec, 2010

2 commits

  • If perf_event_attr.sample_id_all is set it will add the PERF_SAMPLE_ identity
    info:

    TID, TIME, ID, CPU, STREAM_ID

    As a trailer, so that older perf tools can process new files, just ignoring the
    extra payload.

    With this its possible to do further analysis on problems in the event stream,
    like detecting reordering of MMAP and FORK events, etc.

    V2: Fixup header size in comm, mmap and task processing, as we have to take into
    account different sample_types for each matching event, noticed by Thomas Gleixner.

    Thomas also noticed a problem in v2 where if we didn't had space in the buffer we
    wouldn't restore the header size.

    Tested-by: Thomas Gleixner
    Reviewed-by: Thomas Gleixner
    Acked-by: Ian Munsie
    Acked-by: Peter Zijlstra
    Acked-by: Thomas Gleixner
    Cc: Frédéric Weisbecker
    Cc: Ian Munsie
    Cc: Mike Galbraith
    Cc: Peter Zijlstra
    Cc: Paul Mackerras
    Cc: Stephane Eranian
    Cc: Thomas Gleixner
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Those will be made available in sample like events like MMAP, EXEC, etc in a
    followup patch. So precalculate the extra id header space and have a separate
    routine to fill them up.

    V2: Thomas noticed that the id header needs to be precalculated at
    inherit_events too:

    LKML-Reference:

    Tested-by: Thomas Gleixner
    Reviewed-by: Thomas Gleixner
    Acked-by: Ian Munsie
    Acked-by: Peter Zijlstra
    Acked-by: Thomas Gleixner
    Cc: Frédéric Weisbecker
    Cc: Ian Munsie
    Cc: Mike Galbraith
    Cc: Peter Zijlstra
    Cc: Paul Mackerras
    Cc: Stephane Eranian
    Cc: Thomas Gleixner
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

01 Dec, 2010

1 commit


26 Nov, 2010

2 commits