18 Dec, 2018

3 commits

  • Move the perf_top__reset_sample_counters() call to right after we
    display the counters so we can see the updated numbers for longer.

    Signed-off-by: Jiri Olsa
    Acked-by: David S. Miller
    Acked-by: Namhyung Kim
    Cc: Alexander Shishkin
    Cc: Peter Zijlstra
    Link: https://lkml.kernel.org/n/tip-o72pyiwt05f3p2juprwmz2jo@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • Add drop count to 'perf top' headers:

    # perf top --stdio
    PerfTop: 3549 irqs/sec kernel:51.8% exact: 100.0% lost: 0/0 drop: 0/0 [4000Hz cycles:ppp], (all, 8 CPUs)

    # perf top
    Samples: 0 of event 'cycles:ppp', 4000 Hz, Event count (approx.): 0 lost: 0/0 drop: 0/0

    The format is: /

    Signed-off-by: Jiri Olsa
    Acked-by: David S. Miller
    Acked-by: Namhyung Kim
    Cc: Alexander Shishkin
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/n/tip-2lj87zz8tq9ye1ntax3ulw0n@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • Add a 'lost count' to 'perf top' headers:

    # perf top --stdio
    PerfTop: 3850 irqs/sec kernel:49.0% exact: 100.0% lost: 0/0 [4000Hz cycles:ppp], (all, 8 CPUs)

    # perf top
    Samples: 0 of event 'cycles:ppp', 4000 Hz, Event count (approx.): 0 lost: 0/0

    The format is: /

    Signed-off-by: Jiri Olsa
    Acked-by: David S. Miller
    Acked-by: Namhyung Kim
    Tested-by: Arnaldo Carvalho de Melo
    Cc: Alexander Shishkin
    Cc: Peter Zijlstra
    Link: https://lkml.kernel.org/n/tip-zo11rn270gij5jtp8fknpf8u@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

20 Dec, 2013

1 commit

  • Reduce typing, functions use class__method convention, so unlikely to
    clash with other libraries.

    This actually was discussed in the "Link:" referenced message below.

    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
     

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
     

28 May, 2013

1 commit

  • If there's no sample, kernel and exact percent output at the header
    looked like "-nan%".

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

    Namhyung Kim
     

12 Dec, 2012

1 commit

  • Using struct perf_record_opts to specify how to configure the evsel
    perf_event_attrs.

    This gets top closer to record in the way it sets up evsels, with the
    aim of sharing more and more to the point that both will be a single
    utility.

    In this direction top now uses the same callchain option parsing as
    record and that brings DWARF callchains to top, something that was
    already available for record.

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

    Arnaldo Carvalho de Melo
     

15 Aug, 2012

1 commit

  • To replace the longer list_entry constructs for things that are widely
    used:

    perf_evlist__{first,last}(evlist)
    perf_evsel__next(evsel)

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

    Arnaldo Carvalho de Melo
     

20 Jun, 2012

1 commit

  • So that we don't use global variables that could make us misreport event
    names when having a multi window top, for instance.

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

    Arnaldo Carvalho de Melo
     

03 May, 2012

1 commit

  • Use struct perf_target as it is introduced by previous patch.

    This is a preparation of further changes.

    Signed-off-by: Namhyung Kim
    Reviewed-by: David Ahern
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1335417327-11796-4-git-send-email-namhyung.kim@lge.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     

14 Feb, 2012

1 commit

  • Allow a user to collect events for multiple threads or processes
    using a comma separated list.

    e.g., collect data on a VM and its vhost thread:
    perf top -p 21483,21485
    perf stat -p 21483,21485 -ddd
    perf record -p 21483,21485

    or monitoring vcpu threads
    perf top -t 21488,21489
    perf stat -t 21488,21489 -ddd
    perf record -t 21488,21489

    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1328718772-16688-1-git-send-email-dsahern@gmail.com
    Signed-off-by: David Ahern
    Signed-off-by: Arnaldo Carvalho de Melo

    David Ahern
     

25 Jan, 2012

1 commit

  • The new --uid command line option will show only the tasks for a given
    user, using the proc interface to figure out the existing tasks.

    Kernel work is needed to close races at startup, but this should already
    be useful in many use cases.

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

    Arnaldo Carvalho de Melo
     

08 Oct, 2011

1 commit

  • This actually fixes several problems we had in the old 'perf top':

    1. Unresolved symbols not show, limitation that came from the old
    "KernelTop" codebase, to solve it we would need to do changes
    that would make sym_entry have most of the hist_entry fields.
    2. It was using the number of samples, not the sum of sample->period.

    And brings the --sort code that allows us to have all the views in
    'perf report', for instance:

    [root@emilia ~]# perf top --sort dso
    PerfTop: 5903 irqs/sec kernel:77.5% exact: 0.0% [1000Hz cycles], (all, 8 CPUs)
    ------------------------------------------------------------------------------

    31.59% libcrypto.so.1.0.0
    21.55% [kernel]
    18.57% libpython2.6.so.1.0
    7.04% libc-2.12.so
    6.99% _backend_agg.so
    4.72% sshd
    1.48% multiarray.so
    1.39% libfreetype.so.6.3.22
    1.37% perf
    0.71% libgobject-2.0.so.0.2200.5
    0.53% [tg3]
    0.48% libglib-2.0.so.0.2200.5
    0.44% libstdc++.so.6.0.13
    0.40% libcairo.so.2.10800.8
    0.38% libm-2.12.so
    0.34% umath.so
    0.30% libgdk-x11-2.0.so.0.1800.9
    0.22% libpthread-2.12.so
    0.20% libgtk-x11-2.0.so.0.1800.9
    0.20% librt-2.12.so
    0.15% _path.so
    0.13% libpango-1.0.so.0.2800.1
    0.11% libatlas.so.3.0
    0.09% ft2font.so
    0.09% libpangoft2-1.0.so.0.2800.1
    0.08% libX11.so.6.3.0
    0.07% [vdso]
    0.06% cyclictest
    ^C

    All the filter lists can be used as well: --dsos, --comms, --symbols,
    etc.

    The 'perf report' TUI is also reused, being possible to apply all the
    zoom operations, do annotation, etc.

    This change will allow multiple simplifications in the symbol system as
    well, that will be detailed in upcoming changesets.

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

    Arnaldo Carvalho de Melo
     

12 Mar, 2011

2 commits


10 Mar, 2011

2 commits

  • Passing multiple events might force out information about pid/tid/cpu.
    Attached patch leaves 30 characters for this info at the expense of the
    events' names.

    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Han Pingtian
    LKML-Reference:
    Signed-off-by: Jiri Olsa
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • The snprintf function returns number of printed characters even if it
    cross the size parameter. So passing enough events via '-e' parameter
    will cause segmentation fault.

    It's reproduced by following command:

    perf top -e `perf list | grep Tracepoint | awk -F'[' '\
    {gsub(/[[:space:]]+/,"",$1);array[FNR]=$1}END{outputs=array[1];\
    for (i=2;i
    Cc: Han Pingtian
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Jiri Olsa
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

05 Feb, 2011

1 commit


01 Feb, 2011

2 commits

  • Disabled by default as there are features found in the stdio based one
    that aren't implemented, like live annotation, filtering knobs data
    entry.

    Annotation hopefully will get somehow merged with the 'perf annotate'
    code.

    To use it:

    perf top --tui

    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
     
  • Paving the way for a slang browser a la 'perf report --tui'.

    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