20 Sep, 2018

1 commit

  • [ Upstream commit 21b8732eb4479b579bda9ee38e62b2c312c2a0e5 ]

    After update of kernel, the perf tool doesn't run anymore on my 32MB RAM
    powerpc board, but still runs on a 128MB RAM board:

    ~# strace perf
    execve("/usr/sbin/perf", ["perf"], [/* 12 vars */]) = -1 ENOMEM (Cannot allocate memory)
    --- SIGSEGV {si_signo=SIGSEGV, si_code=SI_KERNEL, si_addr=0} ---
    +++ killed by SIGSEGV +++
    Segmentation fault

    objdump -x shows that .bss section has a huge size of 24Mbytes:

    27 .bss 016baca8 101cebb8 101cebb8 001cd988 2**3

    With especially the following objects having quite big size:

    10205f80 l O .bss 00140000 runtime_cycles_stats
    10345f80 l O .bss 00140000 runtime_stalled_cycles_front_stats
    10485f80 l O .bss 00140000 runtime_stalled_cycles_back_stats
    105c5f80 l O .bss 00140000 runtime_branches_stats
    10705f80 l O .bss 00140000 runtime_cacherefs_stats
    10845f80 l O .bss 00140000 runtime_l1_dcache_stats
    10985f80 l O .bss 00140000 runtime_l1_icache_stats
    10ac5f80 l O .bss 00140000 runtime_ll_cache_stats
    10c05f80 l O .bss 00140000 runtime_itlb_cache_stats
    10d45f80 l O .bss 00140000 runtime_dtlb_cache_stats
    10e85f80 l O .bss 00140000 runtime_cycles_in_tx_stats
    10fc5f80 l O .bss 00140000 runtime_transaction_stats
    11105f80 l O .bss 00140000 runtime_elision_stats
    11245f80 l O .bss 00140000 runtime_topdown_total_slots
    11385f80 l O .bss 00140000 runtime_topdown_slots_retired
    114c5f80 l O .bss 00140000 runtime_topdown_slots_issued
    11605f80 l O .bss 00140000 runtime_topdown_fetch_bubbles
    11745f80 l O .bss 00140000 runtime_topdown_recovery_bubbles

    This is due to commit 4d255766d28b1 ("perf: Bump max number of cpus
    to 1024"), because many tables are sized with MAX_NR_CPUS

    This patch gives the opportunity to redefine MAX_NR_CPUS via

    $ make EXTRA_CFLAGS=-DMAX_NR_CPUS=1

    Signed-off-by: Christophe Leroy
    Cc: Alexander Shishkin
    Cc: Peter Zijlstra
    Cc: linuxppc-dev@lists.ozlabs.org
    Link: http://lkml.kernel.org/r/20170922112043.8349468C57@po15668-vm-win7.idsi0.si.c-s.fr
    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Christophe Leroy
     

30 May, 2018

2 commits

  • This reverts commit f766148e47d7d3b8a7128cae511971c0f793e38e which is
    commit ad46e48c65fa1f204fa29eaff1b91174d314a94b upstream.

    It breaks the build. Turns out we don't test perf on stable releases,
    we need to fix that :(

    Reported-by: Pavlos Parissis
    Cc: Jiri Olsa
    Cc: Alexander Shishkin
    Cc: David Ahern
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Arnaldo Carvalho de Melo
    Cc: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • [ Upstream commit ad46e48c65fa1f204fa29eaff1b91174d314a94b ]

    Currently we can crash perf record when running in pipe mode, like:

    $ perf record ls | perf report
    # To display the perf.data header info, please use --header/--header-only options.
    #
    perf: Segmentation fault
    Error:
    The - file has no samples!

    The callstack of the crash is:

    0x0000000000515242 in perf_event__synthesize_event_update_name
    3513 ev = event_update_event__new(len + 1, PERF_EVENT_UPDATE__NAME, evsel->id[0]);
    (gdb) bt
    #0 0x0000000000515242 in perf_event__synthesize_event_update_name
    #1 0x00000000005158a4 in perf_event__synthesize_extra_attr
    #2 0x0000000000443347 in record__synthesize
    #3 0x00000000004438e3 in __cmd_record
    #4 0x000000000044514e in cmd_record
    #5 0x00000000004cbc95 in run_builtin
    #6 0x00000000004cbf02 in handle_internal_command
    #7 0x00000000004cc054 in run_argv
    #8 0x00000000004cc422 in main

    The reason of the crash is that the evsel does not have ids array
    allocated and the pipe's synthesize code tries to access it.

    We don't force evsel ids allocation when we have single event, because
    it's not needed. However we need it when we are in pipe mode even for
    single event as a key for evsel update event.

    Fixing this by forcing evsel ids allocation event for single event, when
    we are in pipe mode.

    Signed-off-by: Jiri Olsa
    Cc: Alexander Shishkin
    Cc: David Ahern
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20180302161354.30192-1-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Jiri Olsa
     

26 Apr, 2018

1 commit

  • [ Upstream commit f290aa1ffa45ed7e37599840878b4dae68269ee1 ]

    Stephan reported we don't unset PERIOD sample type when --no-period is
    specified. Adding the unset check and reset PERIOD if --no-period is
    specified.

    Committer notes:

    Check the sample_type, it shouldn't have PERF_SAMPLE_PERIOD there when
    --no-period is used.

    Before:

    # perf record --no-period sleep 1
    [ perf record: Woken up 1 times to write data ]
    [ perf record: Captured and wrote 0.018 MB perf.data (7 samples) ]
    # perf evlist -v
    cycles:ppp: size: 112, { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME|PERIOD, disabled: 1, inherit: 1, mmap: 1, comm: 1, freq: 1, enable_on_exec: 1, task: 1, precise_ip: 3, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1
    #

    After:

    [root@jouet ~]# perf record --no-period sleep 1
    [ perf record: Woken up 1 times to write data ]
    [ perf record: Captured and wrote 0.019 MB perf.data (17 samples) ]
    [root@jouet ~]# perf evlist -v
    cycles:ppp: size: 112, { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME, disabled: 1, inherit: 1, mmap: 1, comm: 1, freq: 1, enable_on_exec: 1, task: 1, precise_ip: 3, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1
    [root@jouet ~]#

    Reported-by: Stephane Eranian
    Signed-off-by: Jiri Olsa
    Tested-by: Arnaldo Carvalho de Melo
    Tested-by: Stephane Eranian
    Cc: Alexander Shishkin
    Cc: Andi Kleen
    Cc: David Ahern
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20180201083812.11359-3-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Jiri Olsa
     

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
     

02 Sep, 2017

1 commit

  • Support new sample type PERF_SAMPLE_PHYS_ADDR for physical address.

    Add new option --phys-data to record sample physical address.

    Signed-off-by: Kan Liang
    Tested-by: Jiri Olsa
    Acked-by: Stephane Eranian
    Cc: Andi Kleen
    Cc: Madhavan Srinivasan
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1504026672-7304-2-git-send-email-kan.liang@intel.com
    [ Added missing printing in evsel.c patch sent by Jiri Olsa ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Kan Liang
     

19 Jul, 2017

1 commit

  • We create many test events before the real ones just to test specific
    features. But there's no way for attr tests to separate those test
    events from those it needs to check.

    Adding 'ready' call from the events open interface to trigger/start
    events collection for attr test.

    Signed-off-by: Jiri Olsa
    Cc: David Ahern
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Thomas Richter
    Link: http://lkml.kernel.org/r/20170703145030.12903-4-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

14 Mar, 2017

1 commit

  • Introduce a new option to record PERF_RECORD_NAMESPACES events emitted
    by the kernel when fork, clone, setns or unshare are invoked. And update
    perf-record documentation with the new option to record namespace
    events.

    Committer notes:

    Combined it with a later patch to allow printing it via 'perf report -D'
    and be able to test the feature introduced in this patch. Had to move
    here also perf_ns__name(), that was introduced in another later patch.

    Also used PRIu64 and PRIx64 to fix the build in some enfironments wrt:

    util/event.c:1129:39: error: format '%lx' expects argument of type 'long unsigned int', but argument 6 has type 'long long unsigned int' [-Werror=format=]
    ret += fprintf(fp, "%u/%s: %lu/0x%lx%s", idx
    ^
    Testing it:

    # perf record --namespaces -a
    ^C[ perf record: Woken up 1 times to write data ]
    [ perf record: Captured and wrote 1.083 MB perf.data (423 samples) ]
    #
    # perf report -D

    3 2028902078892 0x115140 [0xa0]: PERF_RECORD_NAMESPACES 14783/14783 - nr_namespaces: 7
    [0/net: 3/0xf0000081, 1/uts: 3/0xeffffffe, 2/ipc: 3/0xefffffff, 3/pid: 3/0xeffffffc,
    4/user: 3/0xeffffffd, 5/mnt: 3/0xf0000000, 6/cgroup: 3/0xeffffffb]

    0x1151e0 [0x30]: event: 9
    .
    . ... raw event: size 48 bytes
    . 0000: 09 00 00 00 02 00 30 00 c4 71 82 68 0c 7f 00 00 ......0..q.h....
    . 0010: a9 39 00 00 a9 39 00 00 94 28 fe 63 d8 01 00 00 .9...9...(.c....
    . 0020: 03 00 00 00 00 00 00 00 ce c4 02 00 00 00 00 00 ................

    NAMESPACES events: 1

    #

    Signed-off-by: Hari Bathini
    Acked-by: Jiri Olsa
    Tested-by: Arnaldo Carvalho de Melo
    Cc: Alexander Shishkin
    Cc: Alexei Starovoitov
    Cc: Ananth N Mavinakayanahalli
    Cc: Aravinda Prasad
    Cc: Brendan Gregg
    Cc: Daniel Borkmann
    Cc: Eric Biederman
    Cc: Peter Zijlstra
    Cc: Sargun Dhillon
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/148891930386.25309.18412039920746995488.stgit@hbathini.in.ibm.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Hari Bathini
     

16 Dec, 2016

1 commit

  • Adding perf_evsel::ignore_missing_cpu_thread bool.

    When set true, it allows perf to ignore error of missing pid of perf
    event syscall.

    We remove missing thread id from the thread_map, so the rest of the
    processing like ioctl and mmap won't get disturbed with -1 fd.

    The reason for supporting this is to ease up monitoring group of pids,
    that 'disappear' before perf opens their event. This currently leads
    perf to report error and exit and makes perf record's -u option unusable
    under certain setup.

    With this change we will allow this race and ignore such failure with
    following warning:

    WARNING: Ignored open failure for pid 8605

    Signed-off-by: Jiri Olsa
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20161213074622.GA3084@krava
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

24 Aug, 2016

1 commit


03 Aug, 2016

1 commit

  • Adding --sample-cpu option to be able to explicitly enable CPU sample
    type. Currently it's only enable implicitly in case the target is cpu
    related.

    It will be useful for following c2c record tool.

    Signed-off-by: Jiri Olsa
    Cc: David Ahern
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1470074555-24889-8-git-send-email-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

16 Jul, 2016

2 commits

  • When working with overwritable ring buffer there's a inconvenience
    problem: if perf dumps data after a long period after it starts,
    non-sample events may lost, which makes following 'perf report' unable
    to identify proc name and mmap layout. For example:

    # perf record -m 4 -e raw_syscalls:* -g --overwrite --switch-output \
    dd if=/dev/zero of=/dev/null

    send SIGUSR2 after dd runs long enough. The resuling perf.data lost
    correct comm and mmap events:

    # perf script -i perf.data.2016061522374354
    perf 24478 [004] 2581325.601789: raw_syscalls:sys_exit: NR 0 = 512
    ^^^^
    Should be 'dd'
    27b2e8 syscall_slow_exit_work+0xfe2000e3 (/lib/modules/4.6.0-rc3+/build/vmlinux)
    203cc7 do_syscall_64+0xfe200117 (/lib/modules/4.6.0-rc3+/build/vmlinux)
    b18d83 return_from_SYSCALL_64+0xfe200000 (/lib/modules/4.6.0-rc3+/build/vmlinux)
    7f47c417edf0 [unknown] ([unknown])
    ^^^^^^^^^^^^
    Fail to unwind

    This patch provides a '--tail-synthesize' option, allows perf to collect
    system status when finalizing output file. In resuling output file, the
    non-sample events reflect system status when dumping data.

    After this patch:
    # perf record -m 4 -e raw_syscalls:* -g --overwrite --switch-output --tail-synthesize \
    dd if=/dev/zero of=/dev/null

    # perf script -i perf.data.2016061600544998
    dd 27364 [004] 2583244.994464: raw_syscalls:sys_enter: NR 1 (1, ...
    ^^
    Correct comm
    203a18 syscall_trace_enter_phase2+0xfe2001a8 ([kernel.kallsyms])
    203aa5 syscall_trace_enter+0xfe200055 ([kernel.kallsyms])
    203caa do_syscall_64+0xfe2000fa ([kernel.kallsyms])
    b18d83 return_from_SYSCALL_64+0xfe200000 ([kernel.kallsyms])
    d8e50 __GI___libc_write+0xffff01d9639f4010 (/tmp/oxygen_root-w00229757/lib64/libc-2.18.so)
    ^^^^^
    Correct unwind

    This option doesn't aim to solve this problem completely. If a process
    terminates before SIGUSR2, we still lost its COMM and MMAP events. For
    example, we can't unwind correctly from the final perf.data we get from
    the previous example, because when perf collects the final output file
    (when we press C-c), 'dd' has been terminated so its '/proc//mmap'
    becomes empty.

    However, this is a cheaper choice. To completely solve this problem we
    need to continously output non-sample events. To satisify the
    requirement of daemonization, we need to merge them periodically. It is
    possible but requires much more code and cycles.

    Automatically select --tail-synthesize when --overwrite is provided.

    Signed-off-by: Wang Nan
    Cc: He Kuang
    Cc: Jiri Olsa
    Cc: Masami Hiramatsu
    Cc: Namhyung Kim
    Cc: Nilay Vaish
    Cc: Zefan Li
    Cc: pi3orama@163.com
    Link: http://lkml.kernel.org/r/1468485287-33422-16-git-send-email-wangnan0@huawei.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Wang Nan
     
  • This patch allows following config terms and option:

    Globally setting events to overwrite;

    # perf record --overwrite ...

    Set specific events to be overwrite or no-overwrite.

    # perf record --event cycles/overwrite/ ...
    # perf record --event cycles/no-overwrite/ ...

    Add missing config terms and update the config term array size because
    the longest string length has changed.

    For overwritable events, it automatically selects attr.write_backward
    since perf requires it to be backward for reading.

    Test result:

    # perf record --overwrite -e syscalls:*enter_nanosleep* usleep 1
    [ perf record: Woken up 2 times to write data ]
    [ perf record: Captured and wrote 0.011 MB perf.data (1 samples) ]
    # perf evlist -v
    syscalls:sys_enter_nanosleep: type: 2, size: 112, config: 0x134, { sample_period, sample_freq }: 1, sample_type: IP|TID|TIME|CPU|PERIOD|RAW, disabled: 1, inherit: 1, mmap: 1, comm: 1, enable_on_exec: 1, task: 1, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1, write_backward: 1
    # Tip: use 'perf evlist --trace-fields' to show fields for tracepoint events

    Signed-off-by: Wang Nan
    Tested-by: Arnaldo Carvalho de Melo
    Acked-by: Jiri Olsa
    Cc: Masami Hiramatsu
    Cc: Namhyung Kim
    Cc: Nilay Vaish
    Cc: Zefan Li
    Cc: pi3orama@163.com
    Link: http://lkml.kernel.org/r/1468485287-33422-14-git-send-email-wangnan0@huawei.com
    Signed-off-by: He Kuang
    Signed-off-by: Arnaldo Carvalho de Melo

    Wang Nan
     

18 Apr, 2016

1 commit


18 Feb, 2016

1 commit

  • Allow user to easily switch all events to user or kernel space with simple
    --all-user or --all-kernel options.

    This will be handy within perf mem/c2c wrappers to switch easily monitoring
    modes.

    Committer note:

    Testing it:

    # perf record --all-kernel --all-user -a sleep 2
    Error: option `all-user' cannot be used with all-kernel
    Usage: perf record [] []
    or: perf record [] -- []

    --all-user Configure all used events to run in user space.
    --all-kernel Configure all used events to run in kernel space.
    # perf record --all-user --all-kernel -a sleep 2
    Error: option `all-kernel' cannot be used with all-user
    Usage: perf record [] []
    or: perf record [] -- []

    --all-kernel Configure all used events to run in kernel space.
    --all-user Configure all used events to run in user space.
    # perf record --all-user -a sleep 1
    [ perf record: Woken up 1 times to write data ]
    [ perf record: Captured and wrote 1.416 MB perf.data (162 samples) ]
    # perf report | grep '\[k\]'
    # perf record --all-kernel -a sleep 1
    [ perf record: Woken up 1 times to write data ]
    [ perf record: Captured and wrote 1.423 MB perf.data (296 samples) ]
    # perf report | grep '\[\.\]'
    #

    Signed-off-by: Jiri Olsa
    Tested-by: Arnaldo Carvalho de Melo
    Cc: Andi Kleen
    Cc: David Ahern
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1455525293-8671-2-git-send-email-jolsa@kernel.org
    [ Made those options to be mutually exclusive ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

01 Sep, 2015

1 commit

  • This patch modifies the -I/--int-regs option to enablepassing the name
    of the registers to sample on interrupt. Registers can be specified by
    their symbolic names. For instance on x86, --intr-regs=ax,si.

    The motivation is to reduce the size of the perf.data file and the
    overhead of sampling by only collecting the registers useful to a
    specific analysis. For instance, for value profiling, sampling only the
    registers used to passed arguements to functions.

    With no parameter, the --intr-regs still records all possible registers
    based on the architecture.

    To name registers, it is necessary to use the long form of the option,
    i.e., --intr-regs:

    $ perf record --intr-regs=si,di,r8,r9 .....

    To record any possible registers:

    $ perf record -I .....
    $ perf report --intr-regs ...

    To display the register, one can use perf report -D

    To list the available registers:

    $ perf record --intr-regs=\?
    available registers: AX BX CX DX SI DI BP SP IP FLAGS CS SS R8 R9 R10 R11 R12 R13 R14 R15

    Signed-off-by: Stephane Eranian
    Tested-by: Arnaldo Carvalho de Melo
    Cc: Adrian Hunter
    Cc: Andi Kleen
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Kan Liang
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1441039273-16260-4-git-send-email-eranian@google.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Stephane Eranian
     

30 Jul, 2015

1 commit


24 Jul, 2015

1 commit


06 Jul, 2015

1 commit

  • If the option -T is used with option --per-thread, then time is still
    not sampled. Fix that by using OPT_BOOLEAN_SET to distinguish when the
    user used the -T option as opposed to the default case when timestamps
    are enabled but only for per-cpu recording.

    Signed-off-by: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Link: http://lkml.kernel.org/r/1436183461-1918-1-git-send-email-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Adrian Hunter
     

20 Jun, 2015

1 commit

  • The time out to limit the individual proc map processing was hard code
    to 500ms. This patch introduce a new option --proc-map-timeout to make
    the time limit configurable.

    Signed-off-by: Kan Liang
    Cc: Andi Kleen
    Cc: David Ahern
    Cc: Ying Huang
    Link: http://lkml.kernel.org/r/1434549071-25611-2-git-send-email-kan.liang@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Kan Liang
     

06 May, 2015

1 commit

  • Add support for making snapshots of AUX area tracing data.

    Signed-off-by: Adrian Hunter
    Acked-by: Jiri Olsa
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1430404667-10593-9-git-send-email-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Adrian Hunter
     

29 Apr, 2015

1 commit

  • Add support for reading from the AUX area tracing mmap and synthesizing
    AUX area tracing events.

    This patch introduces an abstraction for recording AUX area data.

    Recording is initialized by auxtrace_record__init() which is a weak
    function to be implemented by the architecture to provide recording
    callbacks.

    Recording is mainly handled by auxtrace_mmap__read() and
    perf_event__synthesize_auxtrace() but there are callbacks for
    miscellaneous needs including validating and processing user options,
    populating private data in auxtrace_info_event, and freeing the
    structure when finished.

    Signed-off-by: Adrian Hunter
    Acked-by: Jiri Olsa
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1428594864-29309-5-git-send-email-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Adrian Hunter
     

08 Apr, 2015

1 commit

  • Teach perf-record about the new perf_event_attr::{use_clockid, clockid}
    fields. Add a simple parameter to set the clock (if any) to be used for
    the events to be recorded into the data file.

    Since we store the entire perf_event_attr in the EVENT_DESC section we
    also already store the used clockid in the data file.

    Signed-off-by: Peter Zijlstra (Intel)
    Acked-by: David Ahern
    Cc: "H. Peter Anvin"
    Cc: Adrian Hunter
    Cc: Andrew Morton
    Cc: Jiri Olsa
    Cc: John Stultz
    Cc: Linus Torvalds
    Cc: Stephane Eranian
    Cc: Thomas Gleixner
    Cc: Yunlong Song
    Link: http://lkml.kernel.org/r/20150407154851.GR23123@twins.programming.kicks-ass.net
    [ Conditionally define CLOCK_BOOTTIME, at least rhel6 doesn't have it - dsahern
    Ditto for CLOCK_MONOTONIC_RAW, sles11sp2 doesn't have it - yunlong.song ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Peter Zijlstra
     

26 Mar, 2015

1 commit

  • SPARC based systems currently support up to 1024 cpus (e.g. T5-8).
    Allow perf to work on those systems.

    Signed-off-by: David Ahern
    Link: http://lkml.kernel.org/r/1427213438-127216-1-git-send-email-david.ahern@oracle.com
    Signed-off-by: Arnaldo Carvalho de Melo

    David Ahern
     

25 Feb, 2015

1 commit

  • Add an option to perf record to record running/enabled time for read
    events, similar to what stat does.

    This is useful to understand multiplexing problems.

    Right now the report support is not great, but at least report -D
    already supports it.

    Signed-off-by: Andi Kleen
    Acked-by: Jiri Olsa
    Cc: Namhyung Kim
    Link: http://lkml.kernel.org/r/1424819620-16043-1-git-send-email-andi@firstfloor.org
    [ Fixed the Documentation entry to match the OPT_BOOLEAN one ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Andi Kleen
     

16 Nov, 2014

1 commit

  • Add the infrastructure to setup, collect and report the interrupt
    machine state regs which can be captured by the kernel.

    Signed-off-by: Stephane Eranian
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: cebbert.lkml@gmail.com
    Cc: Adrian Hunter
    Cc: Andi Kleen
    Cc: Arnaldo Carvalho de Melo
    Cc: David Ahern
    Cc: Don Zickus
    Cc: Jean Pihet
    Cc: Jiri Olsa
    Cc: Jiri Olsa
    Cc: Linus Torvalds
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Stephane Eranian
    Cc: Waiman Long
    Cc: Wang Nan
    Link: http://lkml.kernel.org/r/1411559322-16548-4-git-send-email-eranian@google.com
    Signed-off-by: Ingo Molnar

    Stephane Eranian
     

29 Oct, 2014

1 commit

  • Those are shared with other builtin commands like kvm, script. So
    make it accessable from them. This is a preparation of later change
    that limiting possible options.

    Signed-off-by: Namhyung Kim
    Acked-by: Hemant Kumar
    Cc: Alexander Yarygin
    Cc: David Ahern
    Cc: Hemant Kumar
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Masami Hiramatsu
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1413990949-13953-3-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     

26 Sep, 2014

1 commit

  • So that all callchain config parameters can be read/written to a single
    place. It's a preparation to consolidate handling of all callchain
    options.

    Reviewed-by: David Ahern
    Signed-off-by: Namhyung Kim
    Acked-by: Jiri Olsa
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Milian Wolff
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1411434104-5307-3-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     

05 May, 2014

10 commits

  • Into tools/include/linux/compiler.h header.

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

    Jiri Olsa
     
  • Into perf-sys.h header, as requested by Peter:
    http://lkml.kernel.org/r/20140502115201.GI30445@twins.programming.kicks-ass.net

    Adding HAVE_ATTR_TEST define to turn off/on the attribute
    test code in the sys_perf_event_open function.

    Requested-by: Peter Zijlstra
    Acked-by: Arnaldo Carvalho de Melo
    Acked-by: Peter Zijlstra
    Cc: Arnaldo Carvalho de Melo
    Cc: Borislav Petkov
    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/1399293219-8732-10-git-send-email-jolsa@kernel.org
    Signed-off-by: Jiri Olsa

    Jiri Olsa
     
  • Into new perf-sys.h header.

    The main reason is to separate system specific perf data
    from perf tool stuff, so it could be used in small test
    programs, as requested Peter:

    http://lkml.kernel.org/r/20140502115201.GI30445@twins.programming.kicks-ass.net

    This separation makes the perf.h header more clear.

    Requested-by: Peter Zijlstra
    Acked-by: Arnaldo Carvalho de Melo
    Acked-by: Peter Zijlstra
    Cc: Arnaldo Carvalho de Melo
    Cc: Borislav Petkov
    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/1399293219-8732-9-git-send-email-jolsa@kernel.org
    Signed-off-by: Jiri Olsa

    Jiri Olsa
     
  • Into util/callchain.h header where all callchain related
    structures should be.

    Acked-by: Arnaldo Carvalho de Melo
    Acked-by: Peter Zijlstra
    Cc: Arnaldo Carvalho de Melo
    Cc: Borislav Petkov
    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/1399293219-8732-8-git-send-email-jolsa@kernel.org
    Signed-off-by: Jiri Olsa

    Jiri Olsa
     
  • Into util/event.h header where all sample data structures
    are defined.

    Acked-by: Arnaldo Carvalho de Melo
    Acked-by: Peter Zijlstra
    Cc: Arnaldo Carvalho de Melo
    Cc: Borislav Petkov
    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/1399293219-8732-7-git-send-email-jolsa@kernel.org
    Signed-off-by: Jiri Olsa

    Jiri Olsa
     
  • It's defined in include/uapi/linux/prctl.h header.
    Also it was never used in perf tool.

    Acked-by: Arnaldo Carvalho de Melo
    Acked-by: Peter Zijlstra
    Cc: Arnaldo Carvalho de Melo
    Cc: Borislav Petkov
    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/1399293219-8732-6-git-send-email-jolsa@kernel.org
    Signed-off-by: Jiri Olsa

    Jiri Olsa
     
  • As it's no longer used.

    Acked-by: Arnaldo Carvalho de Melo
    Acked-by: Peter Zijlstra
    Cc: Arnaldo Carvalho de Melo
    Cc: Borislav Petkov
    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/1399293219-8732-5-git-send-email-jolsa@kernel.org
    Signed-off-by: Jiri Olsa

    Jiri Olsa
     
  • It's defined in tools/perf/util/include/linux/kernel.h header.

    Acked-by: Arnaldo Carvalho de Melo
    Acked-by: Peter Zijlstra
    Cc: Arnaldo Carvalho de Melo
    Cc: Borislav Petkov
    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/1399293219-8732-4-git-send-email-jolsa@kernel.org
    Signed-off-by: Jiri Olsa

    Jiri Olsa
     
  • It's defined in tools/include/linux/compiler.h header.

    Acked-by: Arnaldo Carvalho de Melo
    Acked-by: Peter Zijlstra
    Cc: Arnaldo Carvalho de Melo
    Cc: Borislav Petkov
    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/1399293219-8732-3-git-send-email-jolsa@kernel.org
    Signed-off-by: Jiri Olsa

    Jiri Olsa
     
  • As it's no longer used.

    Acked-by: Arnaldo Carvalho de Melo
    Acked-by: Peter Zijlstra
    Cc: Arnaldo Carvalho de Melo
    Cc: Borislav Petkov
    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/1399293219-8732-2-git-send-email-jolsa@kernel.org
    Signed-off-by: Jiri Olsa

    Jiri Olsa
     

02 May, 2014

1 commit

  • Combine all definitions into a common tools/include/linux/types.h and
    kill the wild growth elsewhere. Move DECLARE_BITMAP to its proper
    bitmap.h header.

    Signed-off-by: Borislav Petkov
    Acked-by: Rusty Russell
    Link: http://lkml.kernel.org/n/tip-azczs7qcv6h9xek9od10hiv2@git.kernel.org
    Signed-off-by: Jiri Olsa

    Borislav Petkov
     

28 Apr, 2014

1 commit

  • Adding automated test for memory maps lookup within multiple machines
    threads.

    The test creates 4 threads and separated memory maps. It checks that we
    could use thread__find_addr_map function with thread object based on TID
    to find memory maps.

    Acked-by: Namhyung Kim
    Cc: Adrian Hunter
    Cc: Arnaldo Carvalho de Melo
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Don Zickus
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1397490723-1992-2-git-send-email-jolsa@redhat.com
    Signed-off-by: Jiri Olsa

    Jiri Olsa