18 Jun, 2010

1 commit

  • At exit, perf record will kill the process it was profiling by sending a
    SIGTERM to child_pid (if it had been initialised), but in certain situations
    child_pid may be 0 and perf would mistakenly kill more processes than intended.

    child_pid is set to the return of fork() to either 0 or the pid of the child.
    Ordinarily this would not present an issue as the child calls execvp to spawn
    the process to be profiled and would therefore never run it's sig_atexit and
    never attempt to kill pid 0.

    However, if a nonexistant binary had been passed in to perf record the call to
    execvp would fail and child_pid would be left set to 0. The child would then
    exit and it's atexit handler, finding that child_pid was initialised to 0,
    would call kill(0, SIGTERM), resulting in every process within it's process
    group being killed.

    In the case that perf was being run directly from the shell this typically
    would not be an issue as the shell isolates the process. However, if perf was
    being called from another program it could kill unexpected processes, which may
    even include X.

    This patch changes the logic of the test for whether child_pid was initialised
    to only consider positive pids as valid, thereby never attempting to kill pid
    0.

    Cc: David S. Miller
    Cc: Frédéric Weisbecker
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Ian Munsie
    Signed-off-by: Arnaldo Carvalho de Melo

    Ian Munsie
     

01 Jun, 2010

1 commit

  • When forking the child to be traced, we should check the correct
    return value from fork() and not a local variable which is otherwise
    unused.

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

    Borislav Petkov
     

21 May, 2010

3 commits

  • It seems a waste of space to create a buffer per
    event, share it per-cpu.

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

    Peter Zijlstra
     
  • Since it is not allowed to create cross-cpu (or
    cross-task) buffers, this option is no longer valid.

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

    Peter Zijlstra
     
  • Perf record repeatedly calls gettimeofday() which adds noise to the performance
    measurements. Since gettimeofday() is only used for the error printf, delete
    it.

    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    LKML-Reference:
    Signed-off-by: Russ Anderson
    Signed-off-by: Arnaldo Carvalho de Melo

    Russ Anderson
     

19 May, 2010

1 commit

  • Without the bloated cplus_demangle from binutils, i.e building with:

    $ make NO_DEMANGLE=1 O=~acme/git/build/perf -j3 -C tools/perf/ install

    Before:

    text data bss dec hex filename
    471851 29280 4025056 4526187 45106b /home/acme/bin/perf

    After:

    [acme@doppio linux-2.6-tip]$ size ~/bin/perf
    text data bss dec hex filename
    446886 29232 4008576 4484694 446e56 /home/acme/bin/perf

    So its a 5.3% size reduction in code, but the interesting part is in the git
    diff --stat output:

    19 files changed, 20 insertions(+), 1909 deletions(-)

    If we ever need some of the things we got from git but weren't using, we just
    have to go to the git repo and get fresh, uptodate source code bits.

    Cc: Frédéric Weisbecker
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

18 May, 2010

1 commit

  • To avoid problems like the one fixed by Stephane Eranian in 3de29ca, now
    we'll got this instead:

    bench/sched-messaging.c:259: error: negative width in bit-field ‘’
    bench/sched-messaging.c:261: error: negative width in bit-field ‘’

    Which is rather cryptic, but is how BUILD_BUG_ON_ZERO works, so kernel
    hackers should be already used to this.

    With it in place found some problems, fixed by changing the affected
    variables to sensible types or changed some OPT_INTEGER to OPT_UINTEGER.

    Next csets will go thru converting each of the remaining OPT_ so that
    review can be made easier by grouping changes per type per patch.

    Cc: Frédéric Weisbecker
    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
     

17 May, 2010

1 commit

  • The -c option defines the user requested sampling period. It was implemented
    using an unsigned int variable but the type of the option was OPT_LONG. Thus,
    the option parser was overwriting memory belonging to other variables, namely
    the mmap_pages leading to a zero page sampling buffer. The bug was exposed only
    when compiling at -O0, probably because the compiler was padding variables at
    higher optimization levels.

    This patch fixes this problem by declaring user_interval as u64. This also
    avoids wrap-around issues for large period on 32-bit systems.

    Commiter note:

    Made it use OPT_U64(user_interval) after implementing OPT_U64 in the
    previous patch.

    Cc: David S. Miller
    Cc: Frédéric Weisbecker
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Stephane Eranian
    Signed-off-by: Arnaldo Carvalho de Melo

    Stephane Eranian
     

14 May, 2010

1 commit

  • By default, event inheritance across fork and pthread_create was on but the -i
    option of stat and record, which enabled inheritance, led to believe it was off
    by default.

    This patch fixes this logic by inverting the meaning of the -i option. By
    default inheritance is on whether you attach to a process (-p), a thread (-t)
    or start a process. If you pass -i, then you turn off inheritance. Turning off
    inheritance if you don't need it, helps limit perf resource usage as well.

    The patch also fixes perf stat -t xxxx and perf record -t xxxx which did not
    start the counters.

    Acked-by: Frederic Weisbecker
    Cc: David S. Miller
    Cc: Frédéric Weisbecker
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Stephane Eranian
    Signed-off-by: Arnaldo Carvalho de Melo

    Stephane Eranian
     

09 May, 2010

1 commit

  • In order to provide a more rubust and deterministic reordering
    algorithm, we need to know when we reach a point where we just
    did a pass through over every counter buffers to read every thing
    they had.

    This patch introduces a new PERF_RECORD_FINISHED_ROUND pseudo event
    that only consist in an event header and doesn't need to contain
    anything.

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

    Frederic Weisbecker
     

05 May, 2010

1 commit

  • Fix a couple of inefficiencies and redundancies related to
    have_tracepoints() and its use when checking whether to write
    TRACE_INFO.

    First, there's no need to use get_tracepoints_path() in
    have_tracepoints() - we really just want the part that checks whether
    any attributes correspondo to tracepoints.

    Second, we really don't care about raw_samples per se - tracepoints
    are always raw_samples. In any case, the have_tracepoints() check
    should be sufficient to decide whether or not to write TRACE_INFO.

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

    Tom Zanussi
     

03 May, 2010

3 commits

  • The current perf code implicitly assumes SAMPLE_RAW means tracepoints
    are being used, but doesn't check for that. It happily records the
    TRACE_INFO even if SAMPLE_RAW is used without tracepoints, but when the
    perf data is read it won't go any further when it finds TRACE_INFO but
    no tracepoints, and displays misleading errors.

    This adds a check for both in perf-record, and won't record TRACE_INFO
    unless both are true. This at least allows perf report -D to dump raw
    events, and avoids triggering a misleading error condition in perf
    trace. It doesn't actually enable the non-tracepoint raw events to be
    displayed in perf trace, since perf trace currently only deals with
    tracepoint events.

    Cc: Frédéric Weisbecker
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Tom Zanussi
    Signed-off-by: Arnaldo Carvalho de Melo

    Tom Zanussi
     
  • With this I was able to actually test Tom Zanussi's two previous patches
    in my usual perf testing ways, i.e. without any tracepoints activated.

    Cc: Frédéric Weisbecker
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Currently, perf 'live mode' writes build-ids at the end of the
    session, which isn't actually useful for processing live mode events.

    What would be better would be to have the build-ids sent before any of
    the samples that reference them, which can be done by processing the
    event stream and retrieving the build-ids on the first hit. Doing
    that in perf-record itself, however, is off-limits.

    This patch introduces perf-inject, which does the same job while
    leaving perf-record untouched. Normal mode perf still records the
    build-ids at the end of the session as it should, but for live mode,
    perf-inject can be injected in between the record and report steps
    e.g.:

    perf record -o - ./hackbench 10 | perf inject -v -b | perf report -v -i -

    perf-inject reads a perf-record event stream and repipes it to stdout.
    At any point the processing code can inject other events into the
    event stream - in this case build-ids (-b option) are read and
    injected as needed into the event stream.

    Build-ids are just the first user of perf-inject - potentially
    anything that needs userspace processing to augment the trace stream
    with additional information could make use of this facility.

    Cc: Ingo Molnar
    Cc: Steven Rostedt
    Cc: Frédéric Weisbecker
    LKML-Reference:
    Signed-off-by: Tom Zanussi
    Signed-off-by: Arnaldo Carvalho de Melo

    Tom Zanussi
     

02 May, 2010

1 commit

  • It doesn't really make sense to record the build ids at the end of a
    live mode session - live mode samples need that information during the
    trace rather than at the end.

    Leave event__synthesize_build_id() in place, however; we'll still be
    using that to synthesize build ids in a more timely fashion in a
    future patch.

    Cc: Frédéric Weisbecker
    Cc: Ingo Molnar
    Cc: Steven Rostedt
    LKML-Reference:
    Signed-off-by: Tom Zanussi
    Signed-off-by: Arnaldo Carvalho de Melo

    Tom Zanussi
     

28 Apr, 2010

1 commit

  • struct kernel_info and kerninfo__ are too vague, what they really
    describe are machines, virtual ones or hosts.

    There are more changes to introduce helpers to shorten function calls
    and to make more clear what is really being done, but I left that for
    subsequent patches.

    Cc: Avi Kivity
    Cc: Frédéric Weisbecker
    Cc: Mike Galbraith
    Cc: Peter Zijlstra
    Cc: Paul Mackerras
    Cc: Zhang, Yanmin
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

19 Apr, 2010

1 commit


15 Apr, 2010

3 commits

  • Conflicts:
    tools/perf/builtin-record.c

    Merge reason: add the live tracing feature, resolve conflict.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • Trace events are mostly used for tracing and then require not to
    be lost when possible. As opposite to hardware events that really
    require to trigger after a given sample period, trace events mostly
    need to trigger everytime.

    It is a frustrating experience to trace with perf and realize we
    lost a lot of events because we forgot the "-c 1" option.

    Then default sample_period to 1 for trace events but let the user
    override it.

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

    Frederic Weisbecker
     
  • Force the overwriting mode by default if append mode is not explicit.
    Adding -f every time one uses perf on a daily basis quickly becomes a
    burden.

    Keep the -f among the options though to avoid breaking some random
    users scripts.

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

    Frederic Weisbecker
     

14 Apr, 2010

7 commits

  • Bypasses the build_id perf header code and replaces it with a
    synthesized event and processing function that accomplishes the
    same thing, used when reading/writing perf data to/from a pipe.

    Signed-off-by: Tom Zanussi
    Acked-by: Thomas Gleixner
    Cc: fweisbec@gmail.com
    Cc: rostedt@goodmis.org
    Cc: k-keiichi@bx.jp.nec.com
    Cc: acme@ghostprotocols.net
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Tom Zanussi
     
  • Bypasses the tracing_data perf header code and replaces it with
    a synthesized event and processing function that accomplishes
    the same thing, used when reading/writing perf data to/from a
    pipe.

    The tracing data is pretty large, and this patch doesn't attempt
    to break it down into component events. The tracing_data event
    itself doesn't actually contain the tracing data, rather it
    arranges for the event processing code to skip over it after
    it's read, using the skip return value added to the event
    processing loop in a previous patch.

    Signed-off-by: Tom Zanussi
    Acked-by: Thomas Gleixner
    Cc: fweisbec@gmail.com
    Cc: rostedt@goodmis.org
    Cc: k-keiichi@bx.jp.nec.com
    Cc: acme@ghostprotocols.net
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Tom Zanussi
     
  • Bypasses the event type perf header code and replaces it with a
    synthesized event and processing function that accomplishes the
    same thing, used when reading/writing perf data to/from a pipe.

    Signed-off-by: Tom Zanussi
    Acked-by: Thomas Gleixner
    Cc: fweisbec@gmail.com
    Cc: rostedt@goodmis.org
    Cc: k-keiichi@bx.jp.nec.com
    Cc: acme@ghostprotocols.net
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Tom Zanussi
     
  • Bypasses the attr perf header code and replaces it with a
    synthesized event and processing function that accomplishes the
    same thing, used when reading/writing perf data to/from a pipe.

    Making the attrs into events allows them to be streamed over a
    pipe along with the rest of the header data (in later patches).
    It also paves the way to allowing events to be added and removed
    from perf sessions dynamically.

    Signed-off-by: Tom Zanussi
    Acked-by: Thomas Gleixner
    Cc: fweisbec@gmail.com
    Cc: rostedt@goodmis.org
    Cc: k-keiichi@bx.jp.nec.com
    Cc: acme@ghostprotocols.net
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Tom Zanussi
     
  • Adds special treatment for stdout - if the user specifies '-o -'
    to perf record, the intent is that the event stream be written
    to stdout rather than to a disk file.

    Also, redirect stdout of forked child to stderr - in pipe mode,
    stdout of the forked child interferes with the stdout perf
    stream, so redirect it to stderr where it can still be seen but
    won't be mixed in with the perf output.

    Signed-off-by: Tom Zanussi
    Acked-by: Thomas Gleixner
    Cc: fweisbec@gmail.com
    Cc: rostedt@goodmis.org
    Cc: k-keiichi@bx.jp.nec.com
    Cc: acme@ghostprotocols.net
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Tom Zanussi
     
  • This patch makes several changes to allow the perf event stream
    to be sent and received over a pipe:

    - adds pipe-specific versions of the header read/write code

    - adds pipe-specific version of the event processing code

    - adds a range of event types to be used for header or other
    pseudo events, above the range used by the kernel

    - checks the return value of event handlers, which they can use
    to skip over large events during event processing rather than actually
    reading them into event objects.

    - unifies the multiple do_read() functions and updates its
    users.

    Note that none of these changes affect the existing perf data
    file format or processing - this code only comes into play if
    perf output is sent to stdout (or is read from stdin).

    Signed-off-by: Tom Zanussi
    Acked-by: Thomas Gleixner
    Cc: fweisbec@gmail.com
    Cc: rostedt@goodmis.org
    Cc: k-keiichi@bx.jp.nec.com
    Cc: acme@ghostprotocols.net
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Tom Zanussi
     
  • Parsing an option from the command line with OPT_BOOLEAN on a
    bool data type would not work on a big-endian machine due to the
    manner in which the boolean was being cast into an int and
    incremented. For example, running 'perf probe --list' on a
    PowerPC machine would fail to properly set the list_events bool
    and would therefore print out the usage information and
    terminate.

    This patch makes OPT_BOOLEAN work as expected with a bool
    datatype. For cases where the original OPT_BOOLEAN was
    intentionally being used to increment an int each time it was
    passed in on the command line, this patch introduces OPT_INCR
    with the old behaviour of OPT_BOOLEAN (the verbose variable is
    currently the only such example of this).

    I have reviewed every use of OPT_BOOLEAN to verify that a true
    C99 bool was passed. Where integers were used, I verified that
    they were only being used for boolean logic and changed them to
    bools to ensure that they would not be mistakenly used as ints.
    The major exception was the verbose variable which now uses
    OPT_INCR instead of OPT_BOOLEAN.

    Signed-off-by: Ian Munsie
    Acked-by: David S. Miller
    Cc: # NOTE: wont apply to .3[34].x cleanly, please backport
    Cc: Git development list
    Cc: Ian Munsie
    Cc: Peter Zijlstra
    Cc: Paul Mackerras
    Cc: Arnaldo Carvalho de Melo
    Cc: KOSAKI Motohiro
    Cc: Hitoshi Mitake
    Cc: Rusty Russell
    Cc: Frederic Weisbecker
    Cc: Eric B Munson
    Cc: Valdis.Kletnieks@vt.edu
    Cc: WANG Cong
    Cc: Thiago Farina
    Cc: Masami Hiramatsu
    Cc: Xiao Guangrong
    Cc: Jaswinder Singh Rajput
    Cc: Arjan van de Ven
    Cc: OGAWA Hirofumi
    Cc: Mike Galbraith
    Cc: Tom Zanussi
    Cc: Anton Blanchard
    Cc: John Kacur
    Cc: Li Zefan
    Cc: Steven Rostedt
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Ian Munsie
     

03 Apr, 2010

2 commits


26 Mar, 2010

1 commit


18 Mar, 2010

2 commits

  • Parameter --pid (or -p) of perf currently means a thread-wide
    collection. For exmaple, if a process whose id is 8888 has 10
    threads, 'perf top -p 8888' just collects the main thread
    statistics. That's misleading. Users are used to attach a whole
    process when debugging a process by gdb. To follow normal usage
    style, the patch change --pid to process-wide collection and add
    --tid (-t) to mean a thread-wide collection.

    Usage example is:

    # perf top -p 8888
    # perf record -p 8888 -f sleep 10
    # perf stat -p 8888 -f sleep 10

    Above commands collect the statistics of all threads of process
    8888.

    Signed-off-by: Zhang Yanmin
    Signed-off-by: Arnaldo Carvalho de Melo
    Cc: Avi Kivity
    Cc: Peter Zijlstra
    Cc: Sheng Yang
    Cc: Joerg Roedel
    Cc: Jes Sorensen
    Cc: Marcelo Tosatti
    Cc: Gleb Natapov
    Cc: zhiteng.huang@intel.com
    Cc: Zachary Amsden
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Zhang, Yanmin
     
  • 'perf record' starts counters before subcommand is execed, so
    the statistics is not precise because it includes data of some
    preparation steps. I fix it with the patch.

    In addition, change the condition to fork/exec subcommand. If
    there is a subcommand parameter, perf always fork/exec it. The
    usage example is:

    # perf record -f -a sleep 10

    So this command could collect statistics for 10 seconds
    precisely. User still could stop it by CTRL+C. Without the new
    capability, user could only input CTRL+C to stop it without
    precise time clock.

    Signed-off-by: Zhang Yanmin
    Signed-off-by: Arnaldo Carvalho de Melo
    Cc: Avi Kivity
    Cc: Peter Zijlstra
    Cc: Sheng Yang
    Cc: oerg Roedel
    Cc: Jes Sorensen
    Cc: Marcelo Tosatti
    Cc: Gleb Natapov
    Cc:
    Cc: Zachary Amsden
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Zhang, Yanmin
     

15 Mar, 2010

1 commit

  • When forking its target, perf record can capture data from
    before the target application is started. Perf stat uses the
    enable_on_exec flag in the event attributes to keep from
    displaying events from before the target program starts, this
    patch adds the same functionality to perf record when it is will
    fork the target process.

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

    Eric B Munson
     

12 Mar, 2010

3 commits


11 Mar, 2010

1 commit

  • At present, the perf subcommands that do system-wide monitoring
    (perf stat, perf record and perf top) don't work properly unless
    the online cpus are numbered 0, 1, ..., N-1. These tools ask
    for the number of online cpus with sysconf(_SC_NPROCESSORS_ONLN)
    and then try to create events for cpus 0, 1, ..., N-1.

    This creates problems for systems where the online cpus are
    numbered sparsely. For example, a POWER6 system in
    single-threaded mode (i.e. only running 1 hardware thread per
    core) will have only even-numbered cpus online.

    This fixes the problem by reading the /sys/devices/system/cpu/online
    file to find out which cpus are online. The code that does that is in
    tools/perf/util/cpumap.[ch], and consists of a read_cpu_map()
    function that sets up a cpumap[] array and returns the number of
    online cpus. If /sys/devices/system/cpu/online can't be read or
    can't be parsed successfully, it falls back to using sysconf to
    ask how many cpus are online and sets up an identity map in cpumap[].

    The perf record, perf stat and perf top code then calls
    read_cpu_map() in the system-wide monitoring case (instead of
    sysconf) and uses cpumap[] to get the cpu numbers to pass to
    perf_event_open.

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

    Paul Mackerras
     

10 Mar, 2010

1 commit

  • Currently perf record does not write the ID or the to disk for
    events. This doesn't allow report to tell if an event stream
    contains one or more types of events. This patch adds this
    entry to the list of data that record will write to disk if more
    than one event was requested.

    Signed-off-by: Eric B Munson
    Signed-off-by: Arnaldo Carvalho de Melo
    Cc: Peter Zijlstra
    Cc: Paul Mackerras
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Eric B Munson
     

08 Feb, 2010

1 commit

  • When 'perf record -g' a existing process, even with debuginfo
    packages, still cannnot get symbol from 'perf report'.

    try:

    perf record -g -p `pidof xxx` -f
    perf report

    68.26% :1181 b74870f2 [.] 0x000000b74870f2
    |
    |--32.09%-- 0xb73b5b44
    | 0xb7487102
    | 0xb748a4e2
    | 0xb748633d
    | 0xb73b41cd
    | 0xb73b4467
    | 0xb747d531

    The reason is: for existing process, in __cmd_record(),
    the pid is 0 rather than the existing process id.

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

    austin_zhang@linux.intel.com
     

04 Feb, 2010

1 commit

  • Setting _FILE_OFFSET_BITS and using O_LARGEFILE, lseek64, etc,
    is redundant. Thanks H. Peter Anvin for pointing it out.

    So, this patch removes O_LARGEFILE, lseek64, etc.

    Suggested-by: "H. Peter Anvin"
    Signed-off-by: Xiao Guangrong
    Cc: Frederic Weisbecker
    Cc: Steven Rostedt
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Xiao Guangrong