11 Mar, 2015

1 commit

  • By keeping pointers to machines, evlist and tool in ordered_events.

    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-0c6huyaf59mqtm2ek9pmposl@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

23 Dec, 2014

1 commit

  • Sometimes it takes a long time to resort hist entries for output in case
    of a large data file. Show a progress bar window and inform user.

    Signed-off-by: Namhyung Kim
    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1419223455-4362-3-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     

15 Oct, 2014

1 commit

  • Now tools that deals want to have an hists per evsel need to call
    hists__init() before creating any evsels, which can be as early as when
    parsing the command line, so do it before calling parse_options().

    The current tools using hists/hist_entries are report, top and annotate,
    change them to request per evsel hists.

    This is in preparation for making evsels usable by 3rd party tools, that
    not necessarily live in perf's source code repository.

    Acked-by: Borislav Petkov
    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-usjx2la743f10ippj7p1b20x@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

14 Oct, 2014

1 commit

  • Now perf_session doesn't require that the evsels in its evlist are hists
    containing ones.

    Tools that are hists based and want to do per evsel events_stats
    updates, if at some point this turns into a necessity, should do it in
    the tool specific code, keeping the session class hists agnostic.

    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-cli1bgwpo82mdikuhy3djsuy@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

10 Oct, 2014

1 commit

  • Not all tools need a hists instance per perf_evsel, so lets pave the way
    to remove evsel->hists while leaving a way to access the hists from a
    specially allocated evsel, one that comes with space at the end where
    lives the evsel.

    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-qlktkhe31w4mgtbd84035sr2@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

26 Sep, 2014

1 commit

  • Because perf_session__new() can fail for more reasons than just ENOMEM,
    modify error code(ENOMEM or EINVAL) to -1.

    Signed-off-by: Taeung Song
    Acked-by: Jiri Olsa
    Acked-by: Namhyung Kim
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Link: http://lkml.kernel.org/r/1411522417-9917-1-git-send-email-treeze.taeung@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Taeung Song
     

14 Aug, 2014

2 commits

  • Currently vmlinux_path__init() only tries to find vmlinux file from
    current directory, /boot and some canonical directories with version
    number of the running kernel. This can be a problem when reporting old
    data recorded on a kernel version not running currently.

    We can use --symfs option for this but it's annoying for user to do it
    always. As we already have the info in the perf.data file, it can be
    changed to use it for the search automatically.

    Before:

    $ perf report
    ...
    # Samples: 4K of event 'cpu-clock'
    # Event count (approx.): 1067250000
    #
    # Overhead Command Shared Object Symbol
    # ........ .......... ................. ..............................
    71.87% swapper [kernel.kallsyms] [k] recover_probed_instruction

    After:

    # Overhead Command Shared Object Symbol
    # ........ .......... ................. ....................
    71.87% swapper [kernel.kallsyms] [k] native_safe_halt

    This requires to change signature of symbol__init() to receive struct
    perf_session_env *.

    Reported-by: Minchan Kim
    Signed-off-by: Namhyung Kim
    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Masami Hiramatsu
    Cc: Minchan Kim
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1407825645-24586-14-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • This is a preparation of fixing dso__load_kernel_sym(). It needs a
    session info before calling symbol__init().

    Signed-off-by: Namhyung Kim
    Acked-by: Jiri Olsa
    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Minchan Kim
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1407825645-24586-4-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     

12 Aug, 2014

1 commit

  • The time ordering is generic for all kinds of events, so using generic
    name 'ordered_events' for ordered_samples bool in perf_tool struct.

    No functional change was intended.

    Signed-off-by: Jiri Olsa
    Acked-by: David Ahern
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jean Pihet
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/n/tip-07mrqzcuhsks9wfmxrzsvemz@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

01 Jun, 2014

2 commits

  • To support callchain accumulation, @entry should be recognized if it's
    accumulated or not when add_hist_entry() called. The period of an
    accumulated entry should be added to ->stat_acc but not ->stat. Add
    @sample_self arg for that.

    Signed-off-by: Namhyung Kim
    Tested-by: Arun Sharma
    Tested-by: Rodrigo Campos
    Cc: Frederic Weisbecker
    Link: http://lkml.kernel.org/r/1401335910-16832-5-git-send-email-namhyung@kernel.org
    Signed-off-by: Jiri Olsa

    Namhyung Kim
     
  • There're some duplicate code for counting number of samples. Add
    hists__inc_nr_samples() and reuse it.

    Suggested-by: Jiri Olsa
    Signed-off-by: Namhyung Kim
    Link: http://lkml.kernel.org/r/1401335910-16832-2-git-send-email-namhyung@kernel.org
    Signed-off-by: Jiri Olsa

    Namhyung Kim
     

24 Apr, 2014

1 commit

  • Currently, accounting each sample is done in multiple places - once
    when adding them to the input tree, other when adding them to the
    output tree. It's not only confusing but also can cause a subtle
    problem since concurrent processing like in perf top might see the
    updated stats before adding entries into the output tree - like seeing
    more (blank) lines at the end and/or slight inaccurate percentage.

    To fix this, only account the entries when it's moved into the output
    tree so that they cannot be seen prematurely. There're some
    exceptional cases here and there - they should be addressed separately
    with comments.

    Signed-off-by: Namhyung Kim
    Link: http://lkml.kernel.org/r/1398327843-31845-7-git-send-email-namhyung@kernel.org
    Signed-off-by: Jiri Olsa

    Namhyung Kim
     

13 Jan, 2014

1 commit

  • For the common evsel list traversal, so that it becomes more compact.

    Use the opportunity to start ditching the 'perf_' from 'perf_evlist__',
    as discussed, as the whole conversion touches a lot of places, lets do
    it piecemeal when we have the chance due to other work, like in this
    case.

    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-qnkx7dzm2h6m6uptkfk03ni6@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

28 Dec, 2013

1 commit

  • For the frequent idiom of:

    free(ptr);
    ptr = NULL;

    Make it expect a pointer to the pointer being freed, so that it becomes
    clear at first sight that the variable being freed is being modified.

    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-pfw02ezuab37kha18wlut7ir@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

19 Dec, 2013

1 commit

  • Since now symbol__addr_inc_samples() does the auto alloc, no need to do
    it prior to calling hist_entry__inc_addr_samples.

    Acked-by: Namhyung Kim
    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-6ife7xq2kef1nn017m04b3id@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

10 Dec, 2013

1 commit

  • A typo in comment of builtin-annotate.c about 'that'.

    Signed-off-by: Dongsheng Yang
    Link: http://lkml.kernel.org/r/46cb069a4ce21141057a07c0b50baa9968e3228c.1386629050.git.yangds.fnst@cn.fujitsu.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Dongsheng Yang
     

05 Nov, 2013

1 commit

  • The __hists__add_{branch,mem}_entry() does almost the same thing that
    __hists__add_entry() does. Consolidate them into one.

    Signed-off-by: Namhyung Kim
    Acked-by: Jiri Olsa
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Rodrigo Campos
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1383202576-28141-2-git-send-email-namhyung@kernel.org
    [ Fixup clash with new COMM infrastructure ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     

24 Oct, 2013

1 commit

  • It can take quite amount of time so add progress bar UI to inform user.

    Signed-off-by: Namhyung Kim
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Linus Torvalds
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1381468543-25334-4-git-send-email-namhyung@kernel.org
    [ perf_progress -> ui_progress ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     

23 Oct, 2013

1 commit

  • As suggested by tglx, 'self' should be replaced by something that is
    more useful.

    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-fmblhc6tbb99tk1q8vowtsbj@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

22 Oct, 2013

2 commits

  • Removing 'fd, fd_pipe, filename, size' from struct perf_session and
    replacing them with struct perf_data_file object.

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

    Jiri Olsa
     
  • This patch is adding 'struct perf_data_file' object as a placeholder for
    all attributes regarding perf.data file handling. Changing
    perf_session__new to take it as an argument.

    The rest of the functionality will be added later to keep this change
    simple enough, because all the places using perf_session are changed
    now.

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

    Jiri Olsa
     

10 Oct, 2013

1 commit

  • Separate out GTK codes to a shared object called libperf-gtk.so. This
    time only GTK codes are built with -fPIC and libperf remains as is. Now
    run GTK hist and annotation browser using libdl.

    Signed-off-by: Namhyung Kim
    Reviewed-by: Pekka Enberg
    Cc: Andi Kleen
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Pekka Enberg
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1379053663-13706-1-git-send-email-namhyung@kernel.org
    [ Fix it up wrt Ingo's tools/perf build speedups ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     

04 Oct, 2013

1 commit

  • Add support for recording and displaying the transaction flags.
    They are essentially a new sort key. Also display them
    in a nice way to the user.

    Signed-off-by: Andi Kleen
    Acked-by: Jiri Olsa
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1379688044-14173-6-git-send-email-andi@firstfloor.org
    Signed-off-by: Ingo Molnar

    Andi Kleen
     

11 Sep, 2013

1 commit

  • This patch adds support for the new PERF_RECORD_MMAP2 record type
    exposed by the kernel. This is an extended PERF_RECORD_MMAP record.

    It adds for each file-backed mapping the device major, minor number and
    the inode number and generation.

    This triplet uniquely identifies the source of a file-backed mapping. It
    can be used to detect identical virtual mappings between processes, for
    instance.

    The patch will prefer MMAP2 over MMAP.

    Signed-off-by: Stephane Eranian
    Cc: Andi Kleen
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1377079825-19057-3-git-send-email-eranian@google.com
    [ Cope with 314add6 "Change machine__findnew_thread() to set thread pid",
    fix 'perf test' regression test entry affected,
    use perf_missing_features.mmap2 to fallback to not using .mmap2 in older kernels,
    so that new tools can work with kernels where this feature is not present ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Stephane Eranian
     

12 Aug, 2013

2 commits

  • Now that the symbol filter is recorded on the machine there is no need
    to pass it to perf_event__preprocess_sample(). So remove it.

    Signed-off-by: Adrian Hunter
    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/1375961547-30267-7-git-send-email-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Adrian Hunter
     
  • Take into use the machines symbol filter member.

    Signed-off-by: Adrian Hunter
    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/1375961547-30267-6-git-send-email-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Adrian Hunter
     

01 Apr, 2013

1 commit

  • perf record has a new option -W that enables weightened sampling.

    Add sorting support in top/report for the average weight per sample and the
    total weight sum. This allows to both compare relative cost per event
    and the total cost over the measurement period.

    Add the necessary glue to perf report, record and the library.

    v2: Merge with new hist refactoring.
    v3: Fix manpage. Remove value check.
    Rename global_weight to weight and weight to local_weight.
    v4: Readd sort keys to manpage
    v5: Move weight to end
    v6: Move weight to template
    v7: Rename weight key.

    Original patch from Andi modified by Stephane Eranian
    to include ONLY the weight supporting code and apply to pristine 3.8.0-rc4.

    Signed-off-by: Andi Kleen
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1359040242-8269-6-git-send-email-eranian@google.com
    [ committer note: changed to cope with fc5871ed and the hists_link perf test entry ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Andi Kleen
     

16 Mar, 2013

2 commits

  • Add --group option to enable event grouping. When enabled, all the
    group members information will be shown with the leader so skip
    non-leader events.

    It only supports --stdio output currently. Later patches will extend
    additional features.

    $ perf annotate --group --stdio
    ...
    Percent | Source code & Disassembly of libpthread-2.15.so
    --------------------------------------------------------------------------------
    :
    :
    :
    : Disassembly of section .text:
    :
    : 000000387dc0aa50 :
    8.08 2.40 5.29 : 387dc0aa50: mov %rdi,%rdx
    0.00 0.00 0.00 : 387dc0aa53: mov 0x10(%rdi),%edi
    0.00 0.00 0.00 : 387dc0aa56: mov %edi,%eax
    0.00 0.80 0.00 : 387dc0aa58: and $0x7f,%eax
    3.03 2.40 3.53 : 387dc0aa5b: test $0x7c,%dil
    0.00 0.00 0.00 : 387dc0aa5f: jne 387dc0aaa9
    0.00 0.00 0.00 : 387dc0aa81: nop
    0.00 0.00 0.00 : 387dc0aa82: xor %eax,%eax
    0.00 0.00 0.00 : 387dc0aa84: retq
    ...

    Signed-off-by: Namhyung Kim
    Cc: Andi Kleen
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Paul Mackerras
    Cc: Pekka Enberg
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1362462812-30885-6-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • Pass evsel instead of evidx. This is a preparation for supporting event
    group view in annotation and no functional change is intended.

    Signed-off-by: Namhyung Kim
    Cc: Andi Kleen
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Paul Mackerras
    Cc: Pekka Enberg
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1362462812-30885-2-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     

15 Feb, 2013

3 commits

  • Add --skip-missing option for skipping symbols that cannot be used for
    annotation. It's the case of kernel symbols that user doesn't have a
    vmlinux image file.

    Signed-off-by: Namhyung Kim
    Cc: Andi Kleen
    Cc: Borislav Petkov
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Paul Mackerras
    Cc: Pekka Enberg
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1360227734-375-8-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • Show multiple annotation result for each evsel. Each result represents
    the most frquently sampled symbol/function for the evsel and it will be
    shown in a tab window.

    For this add a reference to main container (notebook) to the pgctx. At
    the first call to annotate browser, hist_entry__find_annotations() will
    setup a new browser, and next calls will add new tabs to the browser.
    But it requires final perf_gtk__show_annotations() to start processing
    GUI events.

    Signed-off-by: Namhyung Kim
    Cc: Andi Kleen
    Cc: Borislav Petkov
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Paul Mackerras
    Cc: Pekka Enberg
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1360227734-375-3-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • Basic implementation of perf annotate on GTK2. Currently only
    shows first symbol. Add a new --gtk option to use it.

    Signed-off-by: Namhyung Kim
    Cc: Andi Kleen
    Cc: Borislav Petkov
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Pekka Enberg
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1360227734-375-2-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     

07 Feb, 2013

1 commit

  • Currently the setup_sorting() is called for parsing sort keys and exits
    if it failed to add the sort key. As it's included in libperf it'd be
    better returning an error code rather than exiting application inside of
    the library.

    Signed-off-by: Namhyung Kim
    Suggested-by: Arnaldo Carvalho de Melo
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1360130237-9963-2-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     

06 Nov, 2012

1 commit

  • Currently various hist browser functions receive 3 arguments for
    refreshing histogram but only used from a few places. Also it's only
    for perf top command so that it can be NULL for other (and probably
    most) cases. Pack them into a struct in order to reduce number of those
    unused arguments.

    This is a mechanical change and does not intend a functional change.

    Signed-off-by: Namhyung Kim
    Tested-by: David Ahern
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Irina Tirdea
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1351835406-15208-2-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     

29 Oct, 2012

1 commit

  • Currently many perf commands annotate/evlist/report/script/lock etc all
    support "-i" option to chose a specific perf data, and all of them
    create a local "input_name" to save the file name for that perf data.

    Since most of these commands need it, we can add a global variable for
    it, also it can some other benefits:

    1. When calling script browser inside hists/annotation browser, it needs
    to know the perf data file name to run that script.

    2. For further feature like runtime switching to another perf data file,
    this variable can also help.

    Signed-off-by: Feng Tang
    Cc: Andi Kleen
    Cc: Ingo Molnar
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1351569369-26732-2-git-send-email-feng.tang@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Feng Tang
     

25 Oct, 2012

1 commit

  • As we have architecture information of saved perf.data file, we can try
    to find cross-built objdump path.

    The triplets include support for Android (arm, x86 and mips
    architectures).

    Signed-off-by: Irina Tirdea
    Originally-by: Namhyung Kim
    Acked-by: Namhyung Kim
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Pekka Enberg
    Cc: Peter Zijlstra
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/1350344020-8071-5-git-send-email-irina.tirdea@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Irina Tirdea
     

07 Oct, 2012

2 commits

  • Noticed annotate wasn't handling those events while introducing
    perf_event__process_{fork,exit}.

    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-of7tc8eqeuk3cupc6f7jtuq6@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • When we were processing a PERF_RECORD_EXIT event we first used
    machine__findnew_thread for both the thread exiting and for its parent,
    only to use just the thread struct associated with the one exiting, and
    to just delete it.

    If it existed, i.e. not created at this very moment in
    machine__findnew_thread, it will be moved to the machine->dead_threads
    linked list, because we may have hist_entries pointing to it, but if it
    was created just do be deleted, it will just sit there with no
    references at all.

    Use the new machine__find_thread() method so that if it is not there, we
    don't create it.

    As a bonus the parent thread will also not be created at this point.

    Create process_fork() and process_exit() helpers to use this and make
    the builtins use it instead of the generic process_task(), ditched by
    this patch.

    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-z7n2y98ebjyrvmytaope4vdl@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

11 Sep, 2012

1 commit

  • perf defines both __used and __unused variables to use for marking
    unused variables. The variable __used is defined to
    __attribute__((__unused__)), which contradicts the kernel definition to
    __attribute__((__used__)) for new gcc versions. On Android, __used is
    also defined in system headers and this leads to warnings like: warning:
    '__used__' attribute ignored

    __unused is not defined in the kernel and is not a standard definition.
    If __unused is included everywhere instead of __used, this leads to
    conflicts with glibc headers, since glibc has a variables with this name
    in its headers.

    The best approach is to use __maybe_unused, the definition used in the
    kernel for __attribute__((unused)). In this way there is only one
    definition in perf sources (instead of 2 definitions that point to the
    same thing: __used and __unused) and it works on both Linux and Android.
    This patch simply replaces all instances of __used and __unused with
    __maybe_unused.

    Signed-off-by: Irina Tirdea
    Acked-by: Pekka Enberg
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/1347315303-29906-7-git-send-email-irina.tirdea@intel.com
    [ committer note: fixed up conflict with a116e05 in builtin-sched.c ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Irina Tirdea
     

06 Sep, 2012

1 commit

  • When analyzing perf data from hosts of other architecture than one of
    the local host it's useful to call objdump that is part of a toolchain
    for that architecture. Instead of calling regular objdump, call one that
    user specified in command line.

    Signed-off-by: Maciek Borzecki
    Acked-by: David Ahern
    Link: http://lkml.kernel.org/r/1346754750.16299.3.camel@localhost.localdomain
    Signed-off-by: Arnaldo Carvalho de Melo

    Maciek Borzecki