09 Sep, 2020

1 commit

  • The sep is already checked being not NULL. The code seems to be a
    leftover from some refactoring.

    Signed-off-by: Namhyung Kim
    Cc: Alexander Shishkin
    Cc: Ian Rogers
    Cc: Jiri Olsa
    Cc: Mark Rutland
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lore.kernel.org/lkml/20200909055849.469612-1-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     

28 May, 2020

1 commit

  • Before:

    Usage: perf list [] [hw|sw|cache|tracepoint|pmu|sdt|event_glob]

    After:

    Usage: perf list [] [hw|sw|cache|tracepoint|pmu|sdt|metric|metricgroup|event_glob]

    Committer testing:

    Before and after we get these outputs on a Lenovo t480s (i7-8650U):

    # perf list metricgroup

    List of pre-defined events (to be used in -e):

    Metric Groups:

    BrMispredicts
    BrMispredicts_SMT
    Branches
    Cache_Misses
    DSB
    FLOPS
    FLOPS_SMT
    Fetch_BW
    IcMiss
    Instruction_Type
    Memory_BW
    Memory_Bound
    Memory_Lat
    No_group
    PGO
    Pipeline
    Power
    Retire
    SMT
    Summary
    TLB
    TLB_SMT
    TopDownL1
    TopDownL1_SMT
    TopdownL1
    TopdownL1_SMT
    #

    # perf list metric | head -11

    Metrics:

    Backend_Bound
    [This category represents fraction of slots where no uops are being delivered due to a lack of required resources for accepting new uops in the Backend]
    Backend_Bound_SMT
    [This category represents fraction of slots where no uops are being delivered due to a lack of required resources for accepting new uops in the Backend. SMT version; use when SMT is enabled and measuring per logical CPU]
    Bad_Speculation
    [This category represents fraction of slots wasted due to incorrect speculations]
    Bad_Speculation_SMT
    [This category represents fraction of slots wasted due to incorrect speculations. SMT version; use when SMT is enabled and measuring per logical CPU]
    #

    Signed-off-by: Ian Rogers
    Tested-by: Arnaldo Carvalho de Melo
    Cc: Alexander Shishkin
    Cc: Jiri Olsa
    Cc: Mark Rutland
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lore.kernel.org/lkml/20200522064546.164259-1-irogers@google.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Ian Rogers
     

20 Oct, 2019

1 commit

  • There are some deprecated events listed by perf list. But we can't
    remove them from perf list with ease because some old scripts may use
    them.

    Deprecated events are old names of renamed events. When an event gets
    renamed the old name is kept around for some time and marked with
    Deprecated. The newer Intel event lists in the tree already have these
    headers.

    So we need to keep them in the event list, but provide a new option to
    show them. The new option is "--deprecated".

    With this patch, the deprecated events are hidden by default but they
    can be displayed when option "--deprecated" is enabled.

    Signed-off-by: Jin Yao
    Acked-by: Jiri Olsa
    Cc: Alexander Shishkin
    Cc: Andi Kleen
    Cc: Jin Yao
    Cc: Kan Liang
    Cc: Peter Zijlstra
    Link: http://lore.kernel.org/lkml/20191015025357.8708-1-yao.jin@linux.intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jin Yao
     

25 Sep, 2019

1 commit

  • Enhance usability by allowing the same plurality used in the output
    title, for the command line parameter.

    BEFORE, perf deceitfully acts as if there are no metrics to be had:

    $ perf list metrics

    List of pre-defined events (to be used in -e):

    Metric Groups:

    $

    But singular 'metric' shows a list of metrics:

    $ perf list metric

    List of pre-defined events (to be used in -e):

    Metrics:

    IPC
    [Instructions Per Cycle (per logical thread)]
    UPI
    [Uops Per Instruction]

    AFTER, when asking for 'metrics', we actually see the metrics get listed:

    $ perf list metrics

    List of pre-defined events (to be used in -e):

    Metrics:

    IPC
    [Instructions Per Cycle (per logical thread)]
    UPI
    [Uops Per Instruction]

    Fixes: 71b0acce78d1 ("perf list: Add metric groups to perf list")
    Signed-off-by: Kim Phillips
    Reviewed-by: Andi Kleen
    Tested-by: Arnaldo Carvalho de Melo
    Cc: Alexander Shishkin
    Cc: Borislav Petkov
    Cc: Janakarajan Natarajan
    Cc: Jin Yao
    Cc: Jiri Olsa
    Cc: Kan Liang
    Cc: Luke Mujica
    Cc: Martin Liška
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lore.kernel.org/lkml/20190919204306.12598-4-kim.phillips@amd.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Kim Phillips
     

01 Sep, 2019

2 commits

  • Remove the last unneeded use of cache.h in a header, we can check where
    it is really needed, i.e. we can remove it and be sure that it isn't
    being obtained indirectly.

    This is an old file, used by now incorrectly in many places, so it was
    providing includes needed indirectly, fixup this fallout.

    Cc: Adrian Hunter
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Link: https://lkml.kernel.org/n/tip-3x3l8gihoaeh7714os861ia7@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • All we need there is a forward declaration for 'union perf_event', so
    remove it from there and add missing header directives in places using
    things from this indirect include.

    Cc: Adrian Hunter
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Link: https://lkml.kernel.org/n/tip-7ftk0ztstqub1tirjj8o8xbl@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

30 Aug, 2019

1 commit


02 Apr, 2019

1 commit

  • Add support in 'perf list' to output tool internal events, currently
    only 'duration_time'.

    Committer testing:

    $ perf list dur*

    List of pre-defined events (to be used in -e):

    duration_time [Tool event]

    Metric Groups:

    $ perf list sw

    List of pre-defined events (to be used in -e):

    alignment-faults [Software event]
    bpf-output [Software event]
    context-switches OR cs [Software event]
    cpu-clock [Software event]
    cpu-migrations OR migrations [Software event]
    dummy [Software event]
    emulation-faults [Software event]
    major-faults [Software event]
    minor-faults [Software event]
    page-faults OR faults [Software event]
    task-clock [Software event]

    duration_time [Tool event]

    $ perf list | grep duration
    duration_time [Tool event]
    [L1D miss outstandings duration in cycles]
    page walk duration are excluded in Skylake]
    load. EPT page walk duration are excluded in Skylake]
    page walk duration are excluded in Skylake]
    store. EPT page walk duration are excluded in Skylake]
    (instruction fetch) request. EPT page walk duration are excluded in
    instruction fetch request. EPT page walk duration are excluded in
    $

    Signed-off-by: Andi Kleen
    Tested-by: Arnaldo Carvalho de Melo
    Acked-by: Jiri Olsa
    Link: http://lkml.kernel.org/r/20190326221823.11518-5-andi@firstfloor.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Andi Kleen
     

19 Mar, 2019

1 commit

  • When a filter is specified on the command line, filter the metrics too.

    Before:

    % perf list foo
    List of pre-defined events (to be used in -e):

    Metric Groups:

    DSB:
    DSB_Coverage
    [Fraction of Uops delivered by the DSB (aka Decoded Icache; or Uop Cache)]
    ... more metrics ...

    After:

    % perf list foo

    List of pre-defined events (to be used in -e):

    Metric Groups:

    Signed-off-by: Andi Kleen
    Acked-by: Jiri Olsa
    LPU-Reference: 20190314225002.30108-1-andi@firstfloor.org
    Link: https://lkml.kernel.org/n/tip-1y8oi2s8c4jhjtykgs5zvda1@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Andi Kleen
     

15 Feb, 2019

1 commit

  • Display metric expression itself when --details is specified.

    Current list with no details:

    # perf list metrics
    ...
    TopDownL1:
    IPC
    [Instructions Per Cycle (per logical thread)]
    SLOTS
    [Total issue-pipeline slots]
    ...

    Detailed output with metric formula:

    # perf list --details metrics
    ...
    TopDownL1:
    IPC
    [Instructions Per Cycle (per logical thread)]
    [inst_retired.any / cpu_clk_unhalted.thread]
    SLOTS
    [Total issue-pipeline slots]
    [4*(( cpu_clk_unhalted.thread_any / 2 ) if #smt_on else cycles)]
    ...

    Signed-off-by: Jiri Olsa
    Cc: Alexander Shishkin
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20190213123246.4015-6-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

07 Nov, 2017

1 commit

  • Conflicts:
    tools/perf/arch/arm/annotate/instructions.c
    tools/perf/arch/arm64/annotate/instructions.c
    tools/perf/arch/powerpc/annotate/instructions.c
    tools/perf/arch/s390/annotate/instructions.c
    tools/perf/arch/x86/tests/intel-cqm.c
    tools/perf/ui/tui/progress.c
    tools/perf/util/zlib.c

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

13 Sep, 2017

1 commit

  • Add code to perf list to print metric groups, and metrics
    that don't have an event name. The metricgroup code collects
    the eventgroups and events into a rblist, and then prints
    them according to the configured filters.

    The metricgroups are printed by default, but can be
    limited by perf list metric or perf list metricgroup

    % perf list metricgroup
    ..
    Metric Groups:

    DSB:
    DSB_Coverage
    [Fraction of Uops delivered by the DSB (aka Decoded Icache; or Uop Cache)]
    FLOPS:
    GFLOPs
    [Giga Floating Point Operations Per Second]
    Frontend:
    IFetch_Line_Utilization
    [Rough Estimation of fraction of fetched lines bytes that were likely consumed by program instructions]
    Frontend_Bandwidth:
    DSB_Coverage
    [Fraction of Uops delivered by the DSB (aka Decoded Icache; or Uop Cache)]
    Memory_BW:
    MLP
    [Memory-Level-Parallelism (average number of L1 miss demand load when there is at least 1 such miss)]

    v2: Check return value of asprintf to fix warning on FC26
    Fix key in lookup/addition for the groups list

    Signed-off-by: Andi Kleen
    Acked-by: Jiri Olsa
    Link: http://lkml.kernel.org/r/20170831194036.30146-8-andi@firstfloor.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Andi Kleen
     

27 Mar, 2017

1 commit

  • We got it from the git sources but never used it for anything, with the
    place where this would be somehow used remaining:

    static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
    {
    prefix = NULL;
    if (p->option & RUN_SETUP)
    prefix = NULL; /* setup_perf_directory(); */

    Ditch it.

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

    Arnaldo Carvalho de Melo
     

23 Mar, 2017

1 commit

  • Move the printing of perf expressions and internal events to a new
    clearer --details flag, instead of lumping it together with other debug
    options in --debug. This makes it clearer to use.

    Before

    perf list --debug
    ...
    unc_m_power_critical_throttle_cycles
    [Cycles all ranks are in critical thermal throttle. Unit: uncore_imc]
    uncore_imc_2/event=0x86/ MetricName: power_critical_throttle_cycles % MetricExpr: (unc_m_power_critical_throttle_cycles / unc_m_clockticks) * 100.

    after

    perf list --details
    ...
    unc_m_power_critical_throttle_cycles
    [Cycles all ranks are in critical thermal throttle. Unit: uncore_imc]
    uncore_imc_2/event=0x86/ MetricName: power_critical_throttle_cycles % MetricExpr: (unc_m_power_critical_throttle_cycles / unc_m_clockticks) * 100.

    Signed-off-by: Andi Kleen
    Acked-by: Jiri Olsa
    Tested-by: Arnaldo Carvalho de Melo
    Link: http://lkml.kernel.org/r/20170320201711.14142-14-andi@firstfloor.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Andi Kleen
     

08 Feb, 2017

1 commit

  • For debugging and testing it is useful to see the converted alias
    string. Add support to perf stat/record and perf list to print the alias
    conversion. The text string is saved in the alias structure. For perf
    stat/record it is folded into the normal -v. For perf list -v was taken,
    so we use --debug.

    Before:

    % perf list
    ...
    cache:
    l1d.replacement
    [L1D data line replacements]
    l1d_pend_miss.fb_full
    [Cycles a demand request was blocked due to Fill Buffers inavailability]

    After

    % perf list --debug
    ...
    cache:
    l1d.replacement
    [L1D data line replacements]
    cpu/umask=0x1,period=2000003,event=0x51/
    l1d_pend_miss.fb_full
    [Cycles a demand request was blocked due to Fill Buffers inavailability]
    cpu/umask=0x2,period=2000003,cmask=1,event=0x48/

    Signed-off-by: Andi Kleen
    Tested-by: Arnaldo Carvalho de Melo
    Cc: Jiri Olsa
    Link: http://lkml.kernel.org/r/20170128020345.19007-6-andi@firstfloor.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Andi Kleen
     

04 Oct, 2016

2 commits

  • Previously we were dropping the useful longer descriptions that some
    events have in the event list completely. This patch makes them appear with
    perf list.

    Old perf list:

    baclears:
    baclears.all
    [Counts the number of baclears]

    vs new:

    perf list -v:
    ...
    baclears:
    baclears.all
    [The BACLEARS event counts the number of times the front end is
    resteered, mainly when the Branch Prediction Unit cannot provide
    a correct prediction and this is corrected by the Branch Address
    Calculator at the front end. The BACLEARS.ANY event counts the
    number of baclears for any type of branch]

    Signed-off-by: Andi Kleen
    Signed-off-by: Sukadev Bhattiprolu
    Acked-by: Ingo Molnar
    Acked-by: Jiri Olsa
    Cc: Madhavan Srinivasan
    Cc: Peter Zijlstra
    Cc: linuxppc-dev@lists.ozlabs.org
    Link: http://lkml.kernel.org/r/1473978296-20712-13-git-send-email-sukadev@linux.vnet.ibm.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Sukadev Bhattiprolu
     
  • Add a --no-desc flag to 'perf list' to not print the event descriptions
    that were earlier added for JSON events. This may be useful to get a
    less crowded listing.

    It's still default to print descriptions as that is the more useful
    default for most users.

    Signed-off-by: Andi Kleen
    Signed-off-by: Sukadev Bhattiprolu
    Acked-by: Ingo Molnar
    Acked-by: Jiri Olsa
    Tested-by: Arnaldo Carvalho de Melo
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: Madhavan Srinivasan
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1473978296-20712-9-git-send-email-sukadev@linux.vnet.ibm.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Andi Kleen
     

14 Jul, 2016

1 commit

  • Show SDT and pre-cached events by perf-list with "sdt". This also shows
    the binary and build-id where the events are placed only when there are
    same name events on different binaries.

    e.g.:

    # perf list sdt

    List of pre-defined events (to be used in -e):

    sdt_libc:lll_futex_wake [SDT event]
    sdt_libc:lll_lock_wait_private [SDT event]
    sdt_libc:longjmp [SDT event]
    sdt_libc:longjmp_target [SDT event]
    ...
    sdt_libstdcxx:rethrow@/usr/bin/gcc(0cc207fc4b27) [SDT event]
    sdt_libstdcxx:rethrow@/usr/lib64/libstdc++.so.6.0.20(91c7a88fdf49)
    sdt_libstdcxx:throw@/usr/bin/gcc(0cc207fc4b27) [SDT event]
    sdt_libstdcxx:throw@/usr/lib64/libstdc++.so.6.0.20(91c7a88fdf49)

    The binary path and build-id are shown in below format;

    :@()

    Signed-off-by: Masami Hiramatsu
    Signed-off-by: Masami Hiramatsu
    Tested-by: Arnaldo Carvalho de Melo
    Cc: Ananth N Mavinakayanahalli
    Cc: Brendan Gregg
    Cc: Hemant Kumar
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20160624090646.25421.44225.stgit@devbox
    Signed-off-by: Arnaldo Carvalho de Melo

    Masami Hiramatsu
     

18 Dec, 2015

1 commit

  • Move the subcommand-related files from perf to a new library named
    libsubcmd.a.

    Since we're moving files anyway, go ahead and rename 'exec_cmd.*' to
    'exec-cmd.*' to be consistent with the naming of all the other files.

    Signed-off-by: Josh Poimboeuf
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/c0a838d4c878ab17fee50998811612b2281355c1.1450193761.git.jpoimboe@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Josh Poimboeuf
     

01 Oct, 2015

2 commits

  • Before:

    # perf list _alloc_ | head -10
    #

    After:

    # perf list _alloc_ | head -10
    ext4:ext4_alloc_da_blocks [Tracepoint event]
    ext4:ext4_get_implied_cluster_alloc_exit [Tracepoint event]
    kmem:kmem_cache_alloc_node [Tracepoint event]
    kmem:mm_page_alloc_extfrag [Tracepoint event]
    kmem:mm_page_alloc_zone_locked [Tracepoint event]
    xen:xen_mmu_alloc_ptpage [Tracepoint event]
    #

    And it works for all types of events:

    # perf list br

    List of pre-defined events (to be used in -e):

    branch-instructions OR branches [Hardware event]
    branch-misses [Hardware event]

    branch-load-misses [Hardware cache event]
    branch-loads [Hardware cache event]

    branch-instructions OR cpu/branch-instructions/ [Kernel PMU event]
    branch-misses OR cpu/branch-misses/ [Kernel PMU event]

    filelock:break_lease_block [Tracepoint event]
    filelock:break_lease_noblock [Tracepoint event]
    filelock:break_lease_unblock [Tracepoint event]
    syscalls:sys_enter_brk [Tracepoint event]
    syscalls:sys_exit_brk [Tracepoint event]

    #

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

    Arnaldo Carvalho de Melo
     
  • So that one can, for instance, use it with wc -l:

    # perf list *:*write* | wc -l
    60

    Or to look for the "bio" tracepoints, without 'perf list' headers:

    # perf list *:*bio* | head
    block:block_bio_backmerge [Tracepoint event]
    block:block_bio_bounce [Tracepoint event]
    block:block_bio_complete [Tracepoint event]
    block:block_bio_frontmerge [Tracepoint event]
    block:block_bio_queue [Tracepoint event]
    block:block_bio_remap [Tracepoint event]
    #

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

    Arnaldo Carvalho de Melo
     

28 Feb, 2015

3 commits

  • Extend 'perf list --raw-dump' to 'perf list --raw-dump [hw|sw|cache
    |tracepoint|pmu|event_glob]' in order to show the raw-dump of a certain
    kind of events rather than all of the events.

    Example:

    Before this patch:

    $ perf list --raw-dump hw
    branch-instructions branch-misses bus-cycles cache-misses
    cache-references cpu-cycles instructions stalled-cycles-backend
    stalled-cycles-frontend
    alignment-faults context-switches cpu-clock cpu-migrations
    emulation-faults major-faults minor-faults page-faults task-clock
    ...
    ...
    writeback:writeback_thread_start writeback:writeback_thread_stop
    writeback:writeback_wait_iff_congested
    writeback:writeback_wake_background writeback:writeback_wake_thread

    As shown above, all of the events are printed.

    After this patch:

    $ perf list --raw-dump hw
    branch-instructions branch-misses bus-cycles cache-misses
    cache-references cpu-cycles instructions stalled-cycles-backend
    stalled-cycles-frontend

    As shown above, only the hw events are printed.

    Signed-off-by: Yunlong Song
    Tested-by: Arnaldo Carvalho de Melo
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Wang Nan
    Link: http://lkml.kernel.org/r/1425032491-20224-5-git-send-email-yunlong.song@huawei.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Yunlong Song
     
  • Do not need print_events_type or __print_events_type for listing hw/sw
    events, let print_symbol_events do its job instead. Moreover,
    print_symbol_events can also handle event_glob and name_only.

    Signed-off-by: Yunlong Song
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Wang Nan
    Link: http://lkml.kernel.org/r/1425032491-20224-4-git-send-email-yunlong.song@huawei.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Yunlong Song
     
  • If somebody happens to name an event with the beginning of 'tracepoint'
    (e.g. tracepoint_foo), then it will never be showed with perf list
    event_glob, thus we parse the argument 'tracepoint' more carefully for
    accuracy.

    Example:

    Before this patch:

    $ perf list tracepoint_foo:*

    jbd2:jbd2_start_commit [Tracepoint event]
    jbd2:jbd2_commit_locking [Tracepoint event]
    jbd2:jbd2_run_stats [Tracepoint event]
    block:block_rq_issue [Tracepoint event]
    block:block_bio_complete [Tracepoint event]
    block:block_bio_backmerge [Tracepoint event]
    block:block_getrq [Tracepoint event]
    ... ...

    As shown above, all of the tracepoint events are printed. In fact, the
    command's real intention is to print the events of tracepoint_foo.

    After this patch:

    $ perf list tracepoint_foo:*

    tracepoint_foo:tp_foo_enter [Tracepoint event]
    tracepoint_foo:tp_foo_exit [Tracepoint event]

    As shown above, only the events of tracepoint_foo are printed.

    Signed-off-by: Yunlong Song
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Wang Nan
    Link: http://lkml.kernel.org/r/1425032491-20224-3-git-send-email-yunlong.song@huawei.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Yunlong Song
     

13 Feb, 2015

1 commit

  • The hearer text 'List of pre-defined events (to be used in -e):' is
    placed in an improper function, which causes an abnormal output, e.g.
    'perf list hw' shows no guiding text at all, and 'perf list hw
    L1-dcache*' shows the guiding text incorrectly in the middle of the
    output.

    Example
    Before this patch:

    $ perf list hw L1-dcache*

    branch-instructions OR branches [Hardware event]
    branch-misses [Hardware event]
    bus-cycles [Hardware event]
    cache-misses [Hardware event]
    cache-references [Hardware event]
    cpu-cycles OR cycles [Hardware event]
    instructions [Hardware event]
    stalled-cycles-backend OR idle-cycles-backend [Hardware event]
    stalled-cycles-frontend OR idle-cycles-frontend [Hardware event]

    List of pre-defined events (to be used in -e):
    Cc: Peter Zijlstra
    Cc: Paul Mackerras
    Cc: Wang Nan
    Link: http://lkml.kernel.org/r/1423833115-11199-8-git-send-email-yunlong.song@huawei.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Yunlong Song
     

03 Jan, 2015

1 commit

  • Currently, 'perf list --raw-dump' requires extra arguments
    (e.g., hw) to invoke, which breaks bash/zsh completion
    (perf-completion.sh).

    $ perf list --raw-dump
    Error: unknown option `raw-dump'

    usage: perf list [hw|sw|cache|tracepoint|pmu|event_glob]

    After,

    $ perf list --raw-dump
    cpu-cycles instructions cache-references cache-misses ...

    Signed-off-by: Taesoo Kim
    Acked-by: Namhyung Kim
    Cc: Ingo Molnar
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Taesoo kim
    Link: http://lkml.kernel.org/r/1419997015-11071-1-git-send-email-tsgatesv@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Taesoo Kim
     

06 Nov, 2013

2 commits

  • Currently 'perf list' is not very helpful if you forget the syntax:

    $ perf list -h

    List of pre-defined events (to be used in -e):

    After:
    $ perf list -h

    usage: perf list [hw|sw|cache|tracepoint|pmu|event_glob]

    Signed-off-by: David Ahern
    Acked-by: Ingo Molnar
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/527133AD.4030003@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo

    David Ahern
     
  • With a return after the if check an indentation level can be removed.
    Indentation shift only; no functional changes.

    Signed-off-by: David Ahern
    Acked-by: Ingo Molnar
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1383149707-1008-1-git-send-email-dsahern@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo

    David Ahern
     

13 Jul, 2013

1 commit

  • List the kernel supplied pmu event aliases in perf list

    It's better when the users can actually see them.

    Signed-off-by: Andi Kleen
    Link: http://lkml.kernel.org/r/1366480949-32292-2-git-send-email-andi@firstfloor.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Andi Kleen
     

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
     

10 Aug, 2012

1 commit

  • Add basic bash completion for the -e option in record, top and stat
    subcommands. Only hardware, software and tracepoint events are
    supported.

    Breakpoints, raw events and events grouping completion need more
    thinking.

    Signed-off-by: Frederic Weisbecker
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1344522713-27951-3-git-send-email-fweisbec@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Frederic Weisbecker
     

18 Feb, 2011

1 commit

  • The man page has the details, here are some examples:

    [root@emilia ~]# perf list *fault* *:*wait*

    List of pre-defined events (to be used in -e):
    page-faults OR faults [Software event]
    minor-faults [Software event]
    major-faults [Software event]
    alignment-faults [Software event]
    emulation-faults [Software event]

    radeon:radeon_fence_wait_begin [Tracepoint event]
    radeon:radeon_fence_wait_end [Tracepoint event]
    writeback:wbc_writeback_wait [Tracepoint event]
    writeback:wbc_balance_dirty_wait [Tracepoint event]
    writeback:writeback_congestion_wait [Tracepoint event]
    writeback:writeback_wait_iff_congested [Tracepoint event]
    sched:sched_wait_task [Tracepoint event]
    sched:sched_process_wait [Tracepoint event]
    sched:sched_stat_wait [Tracepoint event]
    sched:sched_stat_iowait [Tracepoint event]
    syscalls:sys_enter_epoll_wait [Tracepoint event]
    syscalls:sys_exit_epoll_wait [Tracepoint event]
    syscalls:sys_enter_epoll_pwait [Tracepoint event]
    syscalls:sys_exit_epoll_pwait [Tracepoint event]
    syscalls:sys_enter_rt_sigtimedwait [Tracepoint event]
    syscalls:sys_exit_rt_sigtimedwait [Tracepoint event]
    syscalls:sys_enter_waitid [Tracepoint event]
    syscalls:sys_exit_waitid [Tracepoint event]
    syscalls:sys_enter_wait4 [Tracepoint event]
    syscalls:sys_exit_wait4 [Tracepoint event]
    syscalls:sys_enter_waitpid [Tracepoint event]
    syscalls:sys_exit_waitpid [Tracepoint event]
    [root@emilia ~]#

    Suggested-by: Ingo Molnar
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

13 Aug, 2009

1 commit


01 Jul, 2009

1 commit

  • Enable -Wextra. This found a few real bugs plus a number
    of signed/unsigned type mismatches/uncleanlinesses. It
    also required a few annotations

    All things considered it was still worth it so lets try with
    this enabled for now.

    Cc: Peter Zijlstra
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Arnaldo Carvalho de Melo
    Cc: Frederic Weisbecker
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

07 Jun, 2009

1 commit