14 Mar, 2017

1 commit

  • Introduce a new option to record PERF_RECORD_NAMESPACES events emitted
    by the kernel when fork, clone, setns or unshare are invoked. And update
    perf-record documentation with the new option to record namespace
    events.

    Committer notes:

    Combined it with a later patch to allow printing it via 'perf report -D'
    and be able to test the feature introduced in this patch. Had to move
    here also perf_ns__name(), that was introduced in another later patch.

    Also used PRIu64 and PRIx64 to fix the build in some enfironments wrt:

    util/event.c:1129:39: error: format '%lx' expects argument of type 'long unsigned int', but argument 6 has type 'long long unsigned int' [-Werror=format=]
    ret += fprintf(fp, "%u/%s: %lu/0x%lx%s", idx
    ^
    Testing it:

    # perf record --namespaces -a
    ^C[ perf record: Woken up 1 times to write data ]
    [ perf record: Captured and wrote 1.083 MB perf.data (423 samples) ]
    #
    # perf report -D

    3 2028902078892 0x115140 [0xa0]: PERF_RECORD_NAMESPACES 14783/14783 - nr_namespaces: 7
    [0/net: 3/0xf0000081, 1/uts: 3/0xeffffffe, 2/ipc: 3/0xefffffff, 3/pid: 3/0xeffffffc,
    4/user: 3/0xeffffffd, 5/mnt: 3/0xf0000000, 6/cgroup: 3/0xeffffffb]

    0x1151e0 [0x30]: event: 9
    .
    . ... raw event: size 48 bytes
    . 0000: 09 00 00 00 02 00 30 00 c4 71 82 68 0c 7f 00 00 ......0..q.h....
    . 0010: a9 39 00 00 a9 39 00 00 94 28 fe 63 d8 01 00 00 .9...9...(.c....
    . 0020: 03 00 00 00 00 00 00 00 ce c4 02 00 00 00 00 00 ................

    NAMESPACES events: 1

    #

    Signed-off-by: Hari Bathini
    Acked-by: Jiri Olsa
    Tested-by: Arnaldo Carvalho de Melo
    Cc: Alexander Shishkin
    Cc: Alexei Starovoitov
    Cc: Ananth N Mavinakayanahalli
    Cc: Aravinda Prasad
    Cc: Brendan Gregg
    Cc: Daniel Borkmann
    Cc: Eric Biederman
    Cc: Peter Zijlstra
    Cc: Sargun Dhillon
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/148891930386.25309.18412039920746995488.stgit@hbathini.in.ibm.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Hari Bathini
     

12 Jan, 2017

1 commit


05 Sep, 2016

2 commits


27 Jul, 2016

1 commit

  • At present, when creating module's map, perf gets 'start' address by
    parsing '/proc/modules', but it's the module base address, it isn't the
    start address of the '.text' section.

    In most arches, it's OK. But for s390, it places 'GOT' and 'PLT'
    relocations before '.text' section. So there exists an offset between
    module base address and '.text' section, which will incur wrong symbol
    resolution for modules.

    Fix this bug by getting 'start' address of module's map from parsing
    '/sys/module/[module name]/sections/.text', not from '/proc/modules'.

    Signed-off-by: Song Shan Gong
    Acked-by: Jiri Olsa
    Cc: Christian Borntraeger
    Cc: David Ahern
    Link: http://lkml.kernel.org/r/1469070651-6447-2-git-send-email-gongss@linux.vnet.ibm.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Song Shan Gong
     

20 May, 2016

1 commit


06 May, 2016

1 commit

  • To be used, for instance, for pre-allocating an rb_tree array for
    sorting by other keys besides the current pid one.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Milian Wolff
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-ja0ifkwue7ttjhbwijn6g6eu@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

19 Apr, 2016

1 commit

  • Before the support for using /proc/kcore was introduced, the kallsyms
    routines used /proc/modules and the first 'perf test' entry expected
    finding maps for each module in the system, which is not the case with
    the kcore code. Provide a way to ignore kcore files so that the test can
    have its expectations met.

    Improving the test to cover kcore files as well needs to be done.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-ek5urnu103dlhfk4l6pcw041@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

15 Apr, 2016

1 commit

  • The recent perf_evsel__fprintf_callchain() move to evsel.c added several
    new symbol requirements to the python binding, for instance:

    # perf test -v python
    16: Try 'import perf' in python, checking link problems :
    --- start ---
    test child forked, pid 18030
    Traceback (most recent call last):
    File "", line 1, in
    ImportError: /tmp/build/perf/python/perf.so: undefined symbol:
    callchain_cursor
    test child finished with -1
    ---- end ----
    Try 'import perf' in python, checking link problems: FAILED!
    #

    This would require linking against callchain.c to access to the global
    callchain_cursor variables.

    Since lots of functions already receive as a parameter a
    callchain_cursor struct pointer, make that be the case for some more
    function so that we can start phasing out usage of yet another global
    variable.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-djko3097eyg2rn66v2qcqfvn@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

23 Mar, 2016

1 commit


26 Jan, 2016

1 commit


01 Oct, 2015

1 commit


14 Sep, 2015

1 commit

  • The 'struct machine' represents the machine where the samples were/are
    being collected, and we also have a 'struct perf_env' with extra details
    about such machine, that we were collecting at 'perf.data' creation time
    but we also needed when no perf.data file is being used, such as in
    'perf top'.

    So, get those structs closer together, as they provide a bigger picture
    of the sample's environment.

    In 'perf session', when the file argument is NULL, we can assume that
    the tool is sampling the running machine, so point machine->env to
    the global put in place in previous patches, while set it to the
    perf_header.env one when reading from a file.

    This paves the way for machine->env to be used in
    perf_event__preprocess_sample to populate addr_location.socket.

    Tested-by: Wang Nan
    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Kan Liang
    Cc: Namhyung Kim
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-2ajotl0khscutm68exictoy9@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

24 Jul, 2015

2 commits

  • Support processing of PERF_RECORD_SWITCH events and
    PERF_RECORD_SWITCH_CPU_WIDE events. There is a single
    tools callback for them both so that the tool must
    check the event type before using the extra members
    in PERF_RECORD_SWITCH_CPU_WIDE.

    There is still no way to select the events, though.
    That is added in a subsequest patch.

    Signed-off-by: Adrian Hunter
    Acked-by: Peter Zijlstra (Intel)
    Tested-by: Jiri Olsa
    Cc: Andi Kleen
    Cc: Mathieu Poirier
    Cc: Pawel Moll
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1437471846-26995-3-git-send-email-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Adrian Hunter
     
  • That provides the function signature expected by libtraceevent's
    pevent_set_function_resolver().

    Acked-by: David Ahern
    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Stephane Eranian
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/n/tip-ie6hvlb6u15y4ulg9j1612zg@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

20 Jun, 2015

2 commits

  • The time out to limit the individual proc map processing was hard code
    to 500ms. This patch introduce a new option --proc-map-timeout to make
    the time limit configurable.

    Signed-off-by: Kan Liang
    Cc: Andi Kleen
    Cc: David Ahern
    Cc: Ying Huang
    Link: http://lkml.kernel.org/r/1434549071-25611-2-git-send-email-kan.liang@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Kan Liang
     
  • The thread-stack represents a thread's current stack. When a thread
    exits there can still be many functions on the stack e.g. exit() can be
    called many levels deep, so all the callers will never return. To get
    that information output, the thread-stack must be flushed.

    Previously it was assumed the thread-stack would be flushed when the
    struct thread was deleted. With thread ref-counting it is no longer
    clear when that will be, if ever. So instead explicitly flush all the
    thread-stacks at the end of a session.

    Signed-off-by: Adrian Hunter
    Cc: Jiri Olsa
    Link: http://lkml.kernel.org/r/1432906425-9911-3-git-send-email-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Adrian Hunter
     

08 Jun, 2015

1 commit

  • Calling the function 'machine__new_module' implies a new 'module' will
    be allocated, when in fact what is returned is a 'struct map' instance,
    that not necessarily will be instantiated, as if one already exists with
    the given module name, it will be returned instead.

    So be consistent with other "find and if not there, create" like
    functions, like machine__findnew_thread, machine__findnew_dso, etc, and
    rename it to machine__findnew_module_map(), that in turn will call
    machine__findnew_module_dso().

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Link: http://lkml.kernel.org/n/tip-acv830vd3hwww2ih5vjtbmu3@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

07 Jun, 2015

1 commit

  • This patch modifies the perf tool to handle the new RECORD type,
    PERF_RECORD_LOST_SAMPLES.

    The number of lost-sample events is stored in
    .nr_events[PERF_RECORD_LOST_SAMPLES]. The exact number of samples
    which the kernel dropped is stored in total_lost_samples.

    When the percentage of dropped samples is greater than 5%, a warning
    is printed.

    Here are some examples:

    Eg 1, Recording different frequently-occurring events is safe with the
    patch. Only a very low drop rate is associated with such actions.

    $ perf record -e '{cycles:p,instructions:p}' -c 20003 --no-time ~/tchain ~/tchain

    $ perf report -D | tail
    SAMPLE events: 120243
    MMAP2 events: 5
    LOST_SAMPLES events: 24
    FINISHED_ROUND events: 15
    cycles:p stats:
    TOTAL events: 59348
    SAMPLE events: 59348
    instructions:p stats:
    TOTAL events: 60895
    SAMPLE events: 60895

    $ perf report --stdio --group
    # To display the perf.data header info, please use --header/--header-only options.
    #
    #
    # Total Lost Samples: 24
    #
    # Samples: 120K of event 'anon group { cycles:p, instructions:p }'
    # Event count (approx.): 24048600000
    #
    # Overhead Command Shared Object Symbol
    # ................ ........... ................
    ..................................
    #
    99.74% 99.86% tchain_edit tchain_edit [.] f3
    0.09% 0.02% tchain_edit tchain_edit [.] f2
    0.04% 0.00% tchain_edit [kernel.vmlinux] [k] ixgbe_read_reg

    Eg 2, Recording the same thing multiple times can lead to high drop
    rate, but it is not a useful configuration.

    $ perf record -e '{cycles:p,cycles:p}' -c 20003 --no-time ~/tchain
    Warning: Processed 600592 samples and lost 99.73% samples!
    [perf record: Woken up 148 times to write data]
    [perf record: Captured and wrote 36.922 MB perf.data (1206322 samples)]
    [perf record: Woken up 1 times to write data]
    [perf record: Captured and wrote 0.121 MB perf.data (1629 samples)]

    Signed-off-by: Kan Liang
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Andrew Morton
    Cc: H. Peter Anvin
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: acme@infradead.org
    Cc: eranian@google.com
    Link: http://lkml.kernel.org/r/1431285195-14269-9-git-send-email-kan.liang@intel.com
    Signed-off-by: Ingo Molnar

    Kan Liang
     

29 May, 2015

2 commits

  • Similar to machine__findnew_thread(), also prepping for refcounting and
    locking, this time for struct dso instances.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Link: http://lkml.kernel.org/n/tip-fv3tshv5o1413coh147lszjc@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • We can, given a DSO, figure out if it is a kernel, a kernel module or
    a userlevel DSO, so stop having to process two lists in several
    functions.

    If searching becomes an issue at some point, we can have them in a
    rbtree, etc.

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Don Zickus
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-s4yb0onpdywu6dj2xl9lxi4t@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

09 May, 2015

1 commit

  • In addition to using refcounts for the struct thread lifetime
    management, we need to protect access to machine->threads from
    concurrent access.

    That happens in 'perf top', where a thread processes events, inserting
    and deleting entries from that rb_tree while another thread decays
    hist_entries, that end up dropping references and ultimately deleting
    threads from the rb_tree and releasing its resources when no further
    hist_entry (or other data structures, like in 'perf sched') references
    it.

    So the rule is the same for refcounts + protected trees in the kernel,
    get the tree lock, find object, bump the refcount, drop the tree lock,
    return, use object, drop the refcount if no more use of it is needed,
    keep it if storing it in some other data structure, drop when releasing
    that data structure.

    I.e. pair "t = machine__find(new)_thread()" with a "thread__put(t)", and
    "perf_event__preprocess_sample(&al)" with "addr_location__put(&al)".

    The addr_location__put() one is because as we return references to
    several data structures, we may end up adding more reference counting
    for the other data structures and then we'll drop it at
    addr_location__put() time.

    Acked-by: David Ahern
    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: Don Zickus
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-bs9rt4n0jw3hi9f3zxyy3xln@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

06 May, 2015

2 commits

  • Add support for the PERF_RECORD_ITRACE_START event type. This event can
    be used to determine the pid and tid that are running when Instruction
    Tracing starts. Generally that information would come from a
    sched_switch event but, at the start, no sched_switch events may yet
    have been recorded.

    Signed-off-by: Adrian Hunter
    Acked-by: Jiri Olsa
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1430404667-10593-8-git-send-email-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Adrian Hunter
     
  • Add support for the PERF_RECORD_AUX event type.

    PERF_RECORD_AUX is a new kernel event that records when new data lands
    in the AUX buffer. Currently it is assumed that AUX data follows the
    same ring buffer conventions used by the perf events buffer, and
    consequently the AUX event is not processed during recording.

    It is processed during session processing so that the information in the
    'flags' member is made available.

    The format of PERF_RECORD_AUX is outlined in the linux/perf_events.h
    header file. The 'flags' are also enumerated.

    Intel PT and Intel BTS use the flag named PERF_AUX_FLAG_TRUNCATED to
    determine if data has been lost because the buffer became full as perf
    was not able to empty it fast enough.

    Signed-off-by: Adrian Hunter
    Acked-by: Jiri Olsa
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1430404667-10593-7-git-send-email-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Adrian Hunter
     

10 Apr, 2015

1 commit

  • commit: f3b623b8490a ("perf tools: Reference count struct thread")
    appends every thread->node to dead_threads in machine__remove_thread()
    and list_del_init() this node in thread__put().

    perf_event__exit_del_thread() releases thread wihout using
    machine__remove_thread(), and causes a NULL pointer crash when
    list_del_init(&thread->node) is called. Fix this by using
    machine_remove_thread() instead of using thread__put() directly.

    This problem can be reproduced as following:

    $ perf record ls
    $ perf buildid-list --with-hits
    [ 3874.195070] perf[1018]: segfault at 0 ip 00000000004b0b15 sp
    00007ffc35b44780 error 6 in perf[400000+166000]
    Segmentation fault

    After this patch:
    $ perf record ls
    $ perf buildid-list --with-hits
    bc23e7c3281e542650ba4324421d6acf78f4c23e /proc/kcore
    643324cb0e969f30c56d660f167f84a150845511 [vdso]
    0000000000000000000000000000000000000000 /bin/busybox
    ...

    Signed-off-by: He Kuang
    Tested-by: Arnaldo Carvalho de Melo
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Wang Nan
    Link: http://lkml.kernel.org/r/1428658500-6483-1-git-send-email-hekuang@huawei.com
    Signed-off-by: Arnaldo Carvalho de Melo

    He Kuang
     

03 Mar, 2015

1 commit

  • We need to do that to stop accumulating entries in the dead_threads
    linked list, i.e. we were keeping references to threads in struct hists
    that continue to exist even after a thread exited and was removed from
    the machine threads rbtree.

    We still keep the dead_threads list, but just for debugging, allowing us
    to iterate at any given point over the threads that still are referenced
    by things like struct hist_entry.

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Don Zickus
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-3ejvfyed0r7ue61dkurzjux4@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

29 Oct, 2014

2 commits

  • This patch introduces an abstraction for exporting sample data in a
    database-friendly way. The abstraction does not implement the actual
    output. A subsequent patch takes this facility into use for extending
    the script interface.

    The abstraction is needed because static data like symbols, dsos, comms
    etc need to be exported only once. That means allocating them a unique
    identifier and recording it on each structure. The member 'db_id' is
    used for that. 'db_id' is just a 64-bit sequence number.

    Exporting centres around the db_export__sample() function which exports
    the associated data structures if they have not yet been allocated a
    db_id.

    Signed-off-by: Adrian Hunter
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1414061124-26830-6-git-send-email-adrian.hunter@intel.com
    [ committer note: Stash db_id using symbol_conf.priv_size + symbol__priv() and foo->priv areas ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Adrian Hunter
     
  • Shortening function signature lenght too, since a thread's machine can be
    obtained from thread->mg->machine, no need to pass thread, machine.

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Don Zickus
    Cc: Frederic Weisbecker
    Cc: Jean Pihet
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-5wb6css280ty0cel5p0zo2b1@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

30 Sep, 2014

1 commit

  • This is a precursor patch to enable long name searching of DSOs using
    a rbtree.

    In this patch, a new dsos structure is created which contains only a
    list head structure for the moment.

    The new dsos structure is used, in turn, in the machine structure for
    the user_dsos and kernel_dsos fields.

    Only the following 3 dsos functions are modified to accept the new dsos
    structure parameter instead of list_head:

    - dsos__add()
    - dsos__find()
    - __dsos__findnew()

    Signed-off-by: Waiman Long
    Cc: Adrian Hunter
    Cc: Don Zickus
    Cc: Douglas Hatch
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Scott J Norton
    Link: http://lkml.kernel.org/r/1412021249-19201-2-git-send-email-Waiman.Long@hp.com
    [ Move struct dsos to dso.h to reduce the dso methods depends on machine.h ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Waiman Long
     

23 Aug, 2014

1 commit

  • Add a function to determine if an address is in the kernel. This is
    based on the kernel function kernel_ip().

    Signed-off-by: Adrian Hunter
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1408129739-17368-5-git-send-email-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Adrian Hunter
     

14 Aug, 2014

1 commit

  • Add machine__thread_exec_comm() to return the comm that matches the last
    exec, if the comm_exec flag is present, or the last comm otherwise.

    Signed-off-by: Adrian Hunter
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1406786474-9306-3-git-send-email-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Adrian Hunter
     

24 Jul, 2014

1 commit

  • The VDSO temporary file is unlinked when a session is deleted. That
    precludes the possibilities that there is no session or there is more
    than one session.

    Correctly the vdso belongs to the machine so put the information on
    'struct machine' and get rid of the global variables.

    Reviewed-by: Jiri Olsa
    Signed-off-by: Adrian Hunter
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/53CF9B14.7040408@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Adrian Hunter
     

23 Jul, 2014

1 commit

  • Add an array to struct machine to store the current tid running on each
    cpu.

    Add machine functions to get / set the tid for a cpu.

    This will be used to determine the tid when decoding a per-cpu
    Instruction Trace.

    Signed-off-by: Adrian Hunter
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1406035081-14301-17-git-send-email-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Adrian Hunter
     

15 Mar, 2014

1 commit

  • Forcing the code to always search thread by pid/tid pair.

    The PID value will be needed in future to determine the process thread
    leader for map groups sharing.

    Signed-off-by: Jiri Olsa
    Acked-by: Adrian Hunter
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Don Zickus
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1394805606-25883-3-git-send-email-jolsa@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

18 Feb, 2014

2 commits

  • Since two of the parameters come from the same 'struct
    addr_location', rename machine__resolve_bstack() to sample__resolve_bstack()
    and pass the that addr_location instead.

    This is also for consistency with the same change that resulted in the
    sample__resolve_mem() function.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-99ecqt8jiyyksiyx3se7l5ia@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Since three of the parameters come from the same 'struct addr_location',
    rename machine__resolve_mem() to sample__resolve_mem() and pass the
    that addr_location instead.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-3f5otpssefh9l5hi1t259h8n@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

01 Feb, 2014

1 commit

  • The ref_reloc_sym is always needed for the kernel map in order to check
    for relocation. Consequently set it up when the kernel map is created.
    Otherwise it was only being set up by 'perf record'.

    Signed-off-by: Adrian Hunter
    Tested-by: Jiri Olsa
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1391004884-10334-5-git-send-email-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Adrian Hunter
     

13 Nov, 2013

1 commit

  • Getting unwieldly long, for this app domain should be descriptive enough
    and the use of __ to separate the class from the method names should
    help with avoiding clashes with other code bases.

    Reported-by: David Ahern
    Suggested-by: Ingo Molnar
    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/20131112113427.GA4053@ghostprotocols.net
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

12 Nov, 2013

2 commits

  • Several tools (top, kvm) don't need to be called back to process each of
    the syntheiszed records, instead relying on the machine__process_event
    function to change the per machine data structures that represent
    threads and mmaps, so provide a way to ask for this common idiom.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-pusqibp8n3c4ynegd1frn4zd@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Further simplifications to be done on following patch, as most tools
    don't use the callback, using instead just the canned
    machine__process_event one.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-r1m0vuuj3cat4bampno9yc8d@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo