22 Oct, 2010

1 commit

  • …git/tip/linux-2.6-tip

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (163 commits)
    tracing: Fix compile issue for trace_sched_wakeup.c
    [S390] hardirq: remove pointless header file includes
    [IA64] Move local_softirq_pending() definition
    perf, powerpc: Fix power_pmu_event_init to not use event->ctx
    ftrace: Remove recursion between recordmcount and scripts/mod/empty
    jump_label: Add COND_STMT(), reducer wrappery
    perf: Optimize sw events
    perf: Use jump_labels to optimize the scheduler hooks
    jump_label: Add atomic_t interface
    jump_label: Use more consistent naming
    perf, hw_breakpoint: Fix crash in hw_breakpoint creation
    perf: Find task before event alloc
    perf: Fix task refcount bugs
    perf: Fix group moving
    irq_work: Add generic hardirq context callbacks
    perf_events: Fix transaction recovery in group_sched_in()
    perf_events: Fix bogus AMD64 generic TLB events
    perf_events: Fix bogus context time tracking
    tracing: Remove parent recording in latency tracer graph options
    tracing: Use one prologue for the preempt irqs off tracer function tracers
    ...

    Linus Torvalds
     

12 Oct, 2010

1 commit

  • Changes:
    v4: Fix the cosmetic issue of redundant dot-ops
    v3: Change rmb() to use SYNC
    v2: Include mips unistd.h and define rmb()/cpu_relax() in tools/perf/perf.h

    Signed-off-by: Deng-Cheng Zhu
    Acked-by: Ralf Baechle
    Cc: David Daney
    Cc: Peter Zijlstra
    Cc: Arnaldo Carvalho de Melo
    Cc: Frederic Weisbecker
    Cc: Paul Mackerras
    Signed-off-by: Ingo Molnar

    Deng-Cheng Zhu
     

05 Oct, 2010

1 commit


04 Oct, 2010

3 commits

  • Both python_scripting_ops and perl_scripting_ops have two global definitions.
    One in trace-event-scripting.c and one in their respective scripting-engine
    modules.

    The issue is that depending on the linker order one definition or the other
    is chosen. One is uninitialized (bss), while the other is initialized. If
    the uninitialized version is chosen, then perf does not function properly.

    This patch fixes this by adding the extern prefix to the definitions in
    trace-event-scripting.c.

    Cc: David S. Miller
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Robert Richter
    LKML-Reference:
    Signed-off-by: Stephane Eranian
    Signed-off-by: Arnaldo Carvalho de Melo

    Stephane Eranian
     
  • There a typo in util/ui/browsers/hists.c that leads to a segfault when you
    press the 'a' key on a non-resolved symbol (plain hex address).

    LKML-Reference:
    Signed-off-by: Frederik Deweerdt
    Signed-off-by: Arnaldo Carvalho de Melo

    Frederik Deweerdt
     
  • The patch ecafda6 introduced a problem where all object files would be
    always rebuilt, fix it by using:

    http://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html

    Reported-by: Arnaldo Carvalho de Melo
    Cc: Bernd Petrovitsch
    Signed-off-by: Kusanagi Kouichi
    Signed-off-by: Arnaldo Carvalho de Melo

    Kusanagi Kouichi
     

15 Sep, 2010

1 commit


13 Sep, 2010

1 commit

  • They are useless and take away precious columns and lines, so stop using
    windows.

    One more step in removing newt code, that after all is not being useful
    at all for the coalescing TUI model in perf.

    Suggested-by: Christoph Hellwig
    Cc: Christoph Hellwig
    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
     

10 Sep, 2010

2 commits


08 Sep, 2010

3 commits

  • Don't make argument names from raw parameters (means the parameters are written
    in kprobe-tracer syntax), because the argument syntax may include special
    characters. Just leave it, then kprobe-tracer gives a new name.

    Reported-by: Srikar Dronamraju
    Cc: Peter Zijlstra
    Cc: Paul Mackerras
    Cc: Ingo Molnar
    Cc: Arnaldo Carvalho de Melo
    Cc: Frederic Weisbecker
    LKML-Reference:
    Signed-off-by: Masami Hiramatsu
    Signed-off-by: Arnaldo Carvalho de Melo

    Masami Hiramatsu
     
  • Fix a bug to support %return probe syntax again. Previous commit 4235b04 has a
    bug which disables the %return syntax on perf probe.

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

    Masami Hiramatsu
     
  • Add a perf script which shows packets processing and processed
    time. It helps us to investigate networking or network devices.

    If you want to use it, install perf and record perf.data like
    following.

    If you set script, perf gathers records until it ends.
    If not, you must Ctrl-C to stop recording.

    And if you want a report from record,

    If you use some options, you can limit the output.
    Option is below.

    tx: show only tx packets processing
    rx: show only rx packets processing
    dev=: show processing on this device
    debug: work with debug mode. It shows buffer status.

    For example, if you want to show received packets processing
    associated with eth4,

    106133.171439sec cpu=0
    irq_entry(+0.000msec irq=24:eth4)
    |
    softirq_entry(+0.006msec)
    |
    |---netif_receive_skb(+0.010msec skb=f2d15900 len=100)
    | |
    | skb_copy_datagram_iovec(+0.039msec 10291::10291)
    |
    napi_poll_exit(+0.022msec eth4)

    This perf script helps us to analyze the processing time of a
    transmit/receive sequence.

    Signed-off-by: Koki Sanagi
    Acked-by: David S. Miller
    Cc: Neil Horman
    Cc: Mathieu Desnoyers
    Cc: Kaneshige Kenji
    Cc: Izumo Taku
    Cc: Kosaki Motohiro
    Cc: Lai Jiangshan
    Cc: Scott Mcmillan
    Cc: Steven Rostedt
    Cc: Eric Dumazet
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Frederic Weisbecker

    Koki Sanagi
     

30 Aug, 2010

1 commit


27 Aug, 2010

2 commits

  • Conflicts:
    tools/perf/util/callchain.h

    Merge reason:
    Fix a non-trivial conflict with latest fixes

    Frederic Weisbecker
     
  • Each histogram entry has a callchain root that stores the
    callchain samples. However we forgot to initialize the
    tracking of children hits of these roots, which then got
    random values on their creation.

    The root children hits is multiplied by the minimum percentage
    of hits provided by the user, and the result becomes the minimum
    hits expected from children branches. If the random value due
    to the uninitialization is big enough, then this minimum number
    of hits can be huge and eventually filter every children branches.

    The end result was invisible callchains. All we need to
    fix this is to initialize the children hits of the root.

    Reported-by: Christoph Hellwig
    Signed-off-by: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Arnaldo Carvalho de Melo
    Cc: Paul Mackerras
    Cc: 2.6.32.x-2.6.35.y

    Frederic Weisbecker
     

26 Aug, 2010

6 commits

  • External shared libraries should never be appended to the LDFLAGS as this
    messes the linking order. As EXTLIBS collects those libraries, it seems that
    perl and python libraries should also be appended to EXTLIBS.

    Also fix the broken linking order.

    This is a refresh of a patch by Ozan Çağlayan and improved by both Tom Zanussi
    and Kirill A. Shutemov.

    Cc: Ozan Çağlayan
    Tested-by: Kirill A. Shutemov
    Tested-by: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Tom Zanussi
    Signed-off-by: Arnaldo Carvalho de Melo

    Tom Zanussi
     
  • Given a dso, list the symbols in ascending name order. Needed for
    listing available symbols from perf probe.

    Cc: Ananth N Mavinakayanahalli
    Cc: Andrew Morton
    Cc: Christoph Hellwig
    Cc: "Frank Ch. Eigler"
    Cc: Frederic Weisbecker
    Cc: Jim Keniston
    Cc: Mark Wielaard
    Cc: Masami Hiramatsu
    Cc: Mathieu Desnoyers
    Cc: Naren A Devaiah
    Cc: Oleg Nesterov
    Cc: "Paul E. McKenney"
    Cc: Randy Dunlap
    Cc: Srikar Dronamraju
    Cc: Steven Rostedt
    LKML-Reference:
    Signed-off-by: Srikar Dronamraju
    Signed-off-by: Arnaldo Carvalho de Melo

    Srikar Dronamraju
     
  • When looking at a callchains enabled perf data file one can find it
    tiresome to start with all callchains collapsed and then to have to go
    one by one expanding them.

    So associate 'E' with "Expand all callchains" and 'C' with "Collapse all
    callchains".

    This way now one can have the top level view and then switch to/from
    having all callchains expanded.

    More work is needed to allow expanding just from one branch down to its
    leaves.

    Reported-by: Christoph Hellwig
    Cc: Christoph Hellwig
    Cc: Frederic Weisbecker
    Cc: Mike Galbraith
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Not everytime we show the callchains, removing duplicated initialization
    of this field.

    Cc: Frederic Weisbecker
    Cc: Mike Galbraith
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Its way too stupid to use rb_first() for just caching if there are
    children, use the cheaper RB_EMPTY_ROOT() instead.

    Cc: Frederic Weisbecker
    Cc: Mike Galbraith
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • It wasn't setting the ms.has_children for the hist_entry itself, just
    for the callchain

    Cc: Frederic Weisbecker
    Cc: Mike Galbraith
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

25 Aug, 2010

1 commit


23 Aug, 2010

3 commits

  • If we sort the histograms by comm, which is the default,
    we need to merge some of them, typically different thread
    histograms of a same process, or just same comm. But during
    this merge, we forgot to merge callchains.

    So imagine we have three threads (tids: 1000, 1001, 1002) that
    belong to comm "foo".

    tid 1000 got 100 events
    tid 1001 got 10 events
    tid 1002 got 3 events

    Once we merge these histograms to get a per comm result, we'll
    finally get:

    "foo" got 113 events

    The problem is if we merge 1000 and 1001 histograms into 1002, then
    the end merge result, wrt callchains, will be only callchains that
    belong to 1002.
    This is because we haven't handled callchains in the merge. Only those
    from one of the threads inside a common comm survive.

    It means during this merge, we can lose a lot of callchains.

    Fix this by implementing callchains merge and apply it on histograms
    that collapse.

    Reported-by: Christoph Hellwig
    Signed-off-by: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Arnaldo Carvalho de Melo
    Cc: Paul Mackerras

    Frederic Weisbecker
     
  • Do that to start a consistant callchain API namespace.

    Signed-off-by: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Arnaldo Carvalho de Melo
    Cc: Paul Mackerras
    Cc: Christoph Hellwig

    Frederic Weisbecker
     
  • In order to implement callchains collapsing, we need to keep
    track of the maximum depth in a histogram tree of callchains.
    This way we'll avoid allocating an arbitrary temporary buffer
    size on callchain merge time.

    Signed-off-by: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Arnaldo Carvalho de Melo
    Cc: Paul Mackerras
    Cc: Christoph Hellwig

    Frederic Weisbecker
     

21 Aug, 2010

2 commits

  • Some Linux distributions like ALT Linux provides patched glibc with
    contains strlcpy(). It's confilcts with strlcpy() from perf.

    Let's add check for strlcpy().

    Cc: Peter Zijlstra
    Cc: Paul Mackerras
    Cc: Ingo Molnar
    LKML-Reference:
    Signed-off-by: Kirill A. Shutemov
    Signed-off-by: Arnaldo Carvalho de Melo

    Kirill A. Shutemov
     
  • Relying just on ~/.perfconfig or rebuilding the tool disabling support
    for the TUI is too cumbersome, so allow specifying which UI to use and
    make the command line switch override whatever is in ~/.perfconfig.

    Suggested-by: Christoph Hellwig
    Cc: Christoph Hellwig
    Cc: Frederic Weisbecker
    Cc: Mike Galbraith
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

20 Aug, 2010

3 commits

  • This makes the usual idiom for specifying a series of key codes to exit
    ui_browser__run() for specialized processing (search, annotate, etc) or
    plain exiting the browser more compact.

    It also abstracts away some more libnewt operations. At some point we'll
    also replace NEWT_KEY_foo with something that can be mapped to NEWT or,
    say, gtk.

    Cc: Frederic Weisbecker
    Cc: Mike Galbraith
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Make all browsers return the exit key uniformly and remove the
    newtExitStruct parameter, removing one more newt specific thing from the
    ui API.

    Cc: Frederic Weisbecker
    Cc: Mike Galbraith
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Browsers don't have to deal with absolute coordinates, just using (row,
    column) and leaving the rest to ui_browser is better and removes one
    more UI backend detail from the browsers.

    Also shorten the percent_color setting idiom, removing some more direct
    libslang calls.

    Cc: Frederic Weisbecker
    Cc: Mike Galbraith
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

19 Aug, 2010

1 commit

  • Parts of the build process were generating files outside the specified
    O= directory, causing the build to fail on systems where the sources are
    in a read only file system.

    Fix it by using $(OUTPUT) on these locations.

    Also check that $(OUTPUT) actually exists, just like the top level
    kernel Makefile does. Otherwise the failure message emitted is
    completely misleading.

    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Paul Mackerras
    LKML-Reference:
    Signed-off-by: Kusanagi Kouichi
    Signed-off-by: Arnaldo Carvalho de Melo

    Kusanagi Kouichi
     

17 Aug, 2010

1 commit

  • POSIX sh does not specify the brace expansion, so fix it by replacing the
    global $(shell ...) lines quite at the top creating the output directories with
    real rules.

    Cc: Ingo Molnar
    Cc: Kusanagi Kouichi
    Cc: Peter Zijlstra
    Cc: Paul Mackerras
    LKML-Reference:
    Signed-off-by: Bernd Petrovitsch
    Signed-off-by: Arnaldo Carvalho de Melo

    Bernd Petrovitsch
     

16 Aug, 2010

1 commit

  • As part of ongoing effort to reduce the coupling with libnewt, browsers
    are being changed to return the exit key.

    The annotate browser is not returning it as expected by builtin-annotate
    when annotating multiple symbols (when 'perf annotate' is called without
    specifying a symbol name).

    Fix it by returning the exit key and also adding the RIGHT key as a exit
    key so that going to the next symbol in the TUI can work again.

    Cc: Frederic Weisbecker
    Cc: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

13 Aug, 2010

2 commits


11 Aug, 2010

4 commits