1. 18 Dec, 2018 8 commits
    • Arnaldo Carvalho de Melo's avatar
      perf trace: Allow selecting use the use of the ordered_events code · a761a8d1
      Arnaldo Carvalho de Melo authored
      I was trigger happy on this one, as using ordered_events as implemented
      by Jiri for use with the --block code under discussion on lkml incurs
      in delaying processing to form batches that then get ordered and then
      printed.
      
      With 'perf trace' we want to process the events as they go, without that
      delay, and doing it that way works well for the common case which is to
      trace a thread or a workload started by 'perf trace'.
      
      So revert back to not using ordered_events but add an option to select
      that mode so that users can experiment with their particular use case to
      see if works better, i.e. if the added delay is not a problem and the
      ordering helps.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lkml.kernel.org/n/tip-8ki7sld6rusnjhhtaly26i5o@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a761a8d1
    • Arnaldo Carvalho de Melo's avatar
      perf trace: Rename delivery functions to ease making ordered_events selectable · 7ba61524
      Arnaldo Carvalho de Melo authored
      Just hide a bit more how events gets delivered, hiding ordered_events
      details from the main loop.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lkml.kernel.org/n/tip-lxwwf3238ta4neq2zh1y1h45@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      7ba61524
    • Steven Rostedt (VMware)'s avatar
      tools lib traceevent: Fix processing of dereferenced args in bprintk events · f024cf08
      Steven Rostedt (VMware) authored
      In the case that a bprintk event has a dereferenced pointer that is
      stored as a string, and there's more values to process (more args), the
      arg was not updated to point to the next arg after processing the
      dereferenced pointer, and it screwed up what was to be displayed.
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: linux-trace-devel@vger.kernel.org
      Cc: stable@vger.kernel.org
      Fixes: 37db96bb ("tools lib traceevent: Handle new pointer processing of bprint strings")
      Link: http://lkml.kernel.org/r/20181210134522.3f71e2ca@gandalf.local.homeSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f024cf08
    • Michael Petlan's avatar
      perf stat: Avoid segfaults caused by negated options · 51433ead
      Michael Petlan authored
      Some 'perf stat' options do not make sense to be negated (event,
      cgroup), some do not have negated path implemented (metrics). Due to
      that, it is better to disable the "no-" prefix for them, since
      otherwise, the later opt-parsing segfaults.
      
      Before:
      
        $ perf stat --no-metrics -- ls
        Segmentation fault (core dumped)
      
      After:
      
        $ perf stat --no-metrics -- ls
         Error: option `no-metrics' isn't available
         Usage: perf stat [<options>] [<command>]
      Signed-off-by: default avatarMichael Petlan <mpetlan@redhat.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      LPU-Reference: 1485912065.62416880.1544457604340.JavaMail.zimbra@redhat.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      51433ead
    • Michael Petlan's avatar
      perf tests: Use shebangs in the shell scripts · 4eaf97e8
      Michael Petlan authored
      Since the first line was used as a test identification, it needs to be
      skipped by shell_test__description() function now.
      
      Further notes from Hendrik:
      
      It might be worth to note that adding the shebang is necessary to spot
      them as scripts.
      
      Using /bin/sh looks fine to.  Just briefly checked whether the scripts
      contains some bash-specifics, which is not the case.
      Signed-off-by: default avatarMichael Petlan <mpetlan@redhat.com>
      Reviewed-by: default avatarHendrik Brueckner <brueckner@linux.ibm.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      LPU-Reference: 2127419430.57657104.1542836358464.JavaMail.zimbra@redhat.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      4eaf97e8
    • Adrian Hunter's avatar
      perf auxtrace: Alter addr_filter__entire_dso() to work if there are no symbols · 57176601
      Adrian Hunter authored
      addr_filter__entire_dso() uses the first and last symbols from a dso,
      and so does not work when there are no symbols.  Alter it to filter the
      whole file instead.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Fixes: 1b36c03e ("perf record: Add support for using symbols in address filters")
      Link: http://lkml.kernel.org/r/20181127084634.12469-1-adrian.hunter@intel.com
      [ split from a larger patch ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      57176601
    • Adrian Hunter's avatar
      perf dso: Export data_file_size() method there are no symbols · b5c2161c
      Adrian Hunter authored
      Will be used outside dso.c in a followup patch, so rename it and make it
      non-static.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lkml.kernel.org/r/20181127084634.12469-1-adrian.hunter@intel.com
      [ split from a larger patch ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b5c2161c
    • Ingo Molnar's avatar
      Merge tag 'perf-core-for-mingo-4.21-20181217' of... · ca46afdb
      Ingo Molnar authored
      Merge tag 'perf-core-for-mingo-4.21-20181217' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
      
      Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
      
      - Introduce 'perf record --aio' to use asynchronous IO trace writing, disabled
        by default (Alexey Budankov)
      
      - Add fallback routines to be used in places where we don't have the CPU mode
        (kernel/userspace/hypervisor) and thus must first fallback lookups looking
        at all map trees when trying to resolve symbols (Adrian Hunter)
      
      - Fix error with config term "pt=0", where we should just force "pt=1" and
        warn the user about the former being nonsensical (Adrian Hunter)
      
      - Fix 'perf test' entry where we expect 'sleep' to come in a PERF_RECORD_COMM
        but instead we get 'coreutils' when sleep is provided by some versions of
        the 'coreutils' package (Adrian Hunter)
      
      - Introduce 'perf top --kallsyms file' to match 'perf report --kallsyms', useful
        when dealing with BPF, where symbol resolution happens via kallsyms, not via
        the default vmlinux ELF symtabs (Arnaldo Carvalho de Melo)
      
      - Support 'srccode' output field in 'perf script' (Andi Kleen)
      
      - Introduce basic 'perf annotation' support for the ARC architecture (Eugeniy Paltsev)
      
      - Compute and display average IPC and IPC coverage per symbol in 'perf annotate' and
        'perf report' (Jin Yao)
      
      - Make 'perf top' use ordered_events and process histograms in a separate thread (Jiri Olsa)
      
      - Make 'perf trace' use ordered_events (Jiri Olsa)
      
      - Add support for ETMv3 and PTMv1.1 decoding in cs-etm (Mathieu Poirier)
      
      - Support for ARM A32/T32 instruction sets in CoreSight trace (cs-etm) (Robert Walker)
      
      - Fix 'perf stat' shadow stats for clock events. (Ravi Bangoria)
      
      - Remove needless rb_tree extra indirection from map__find() (Eric Saint-Etienne)
      
      - Fix CSV mode column output for non-cgroup events in 'perf stat' (Stephane Eranian)
      
      - Add sanity check to libtraceevent's is_timestamp_in_us() (Tzvetomir Stoyanov)
      
      - Use ERR_CAST instead of ERR_PTR(PTR_ERR()) (Wen Yang)
      
      - Fix Load_Miss_Real_Latency on SKL/SKX intel vendor event files (Andi Kleen)
      
      - strncpy() fixes triggered by new warnings on gcc 8.2.0 (Arnaldo Carvalho de Melo)
      
      - Handle tracefs syscall tracepoint older 'nr' field in 'perf trace', that got
        renamed to '__syscall_nr' to work in older kernels (Arnaldo Carvalho de Melo)
      
      - Give better hint about devel package for libssl (Arnaldo Carvalho de Melo)
      
      - Fix the 'perf trace' build in architectures lacking explicit mmap.h file (Arnaldo Carvalho de Melo)
      
      - Remove extra rb_tree traversal indirection from map__find() (Eric Saint-Etienne)
      
      - Disable breakpoint tests for 32-bit ARM (Florian Fainelli)
      
      - Fix typos all over the place, mostly in comments, but also in some debug
        messages and JSON files (Ingo Molnar)
      
      - Allow specifying proc-map-timeout in config file (Mark Drayton)
      
      - Fix mmap_flags table generation script (Sihyeon Jang)
      
      - Fix 'size' parameter to snprintf in the 'perf config' code (Sihyeon Jang)
      
      - More libtraceevent renames to make it a proper library (Tzvetomir Stoyanov)
      
      - Implement new API tep_get_ref() in libtraceevent (Tzvetomir Stoyanov)
      
      - Added support for pkg-config in libtraceevent (Tzvetomir Stoyanov)
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      ca46afdb
  2. 17 Dec, 2018 32 commits