1. 08 6月, 2018 10 次提交
  2. 07 6月, 2018 3 次提交
    • I
      Merge tag 'perf-core-for-mingo-4.18-20180606' of... · 2696ec45
      Ingo Molnar 提交于
      Merge tag 'perf-core-for-mingo-4.18-20180606' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
      
      Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
      
      perf stat:
      
       - Display user and system time for workload targets (Jiri Olsa)
      
      perf record:
      
       - Enable arbitrary event names thru name= modifier (Alexey Budankov)
      
      PowerPC:
      
       - Add a python script for hypervisor call statistics (Ravi Bangoria)
      
      Intel PT: (Adrian Hunter)
      
       - Fix sync_switch INTEL_PT_SS_NOT_TRACING
      
       - Fix decoding to accept CBR between FUP and corresponding TIP
      
       - Fix MTC timing after overflow
      
       - Fix "Unexpected indirect branch" error
      
      perf test:
      
       - record+probe_libc_inet_pton:
      
        -  To get the symbol table for dynamic
           shared objects on ubuntu we need to pass the -D/--dynamic command line
           option, unlike with the fedora distros (Arnaldo Carvalho de Melo)
      
       - code-reading:
      
        - Fix perf_env setup for PTI entry trampolines (Adrian Hunter)
      
       - kmod-path:
      
        - Add tests for vdso32 and vdsox32 (Adrian Hunter)
      
       - Use header file util/debug.h (Thomas Richter)
      
      perf annotate:
      
       - Make the various UI backends (stdio, TUI, gtk) use more consistently
        structs with annotation options as specified by the user (Arnaldo Carvalho de Melo)
      
       - Move annotation specific knobs from the symbol_conf global kitchen
        sink to the annotation option structs (Arnaldo Carvalho de Melo)
      
      perf script:
      
       - Add more PMU fields to python scripts event handler dict (Jin Yao)
      
      Core:
      
       - Fix misleading error for some unparsable events mentioning PMUs when
        those are not involved in the problem (Jiri Olsa)
      
       - Consider BSS symbols when processing /proc/kallsyms ('B' and 'b')
        (Arnaldo Carvalho de Melo)
      
      - Be more robust when trying to use per-symbol histograms, checking for
        unlikely but possible cases where the space for the histograms wasn't
        allocated, print a debug message for such cases (Arnaldo Carvalho de Melo)
      
      - Fix symbol and object code resolution for vdso32 and vdsox32 (Adrian Hunter)
      
       - No need to check for null when passing pointers to foo__get() style
        refcount grabbing helpers, just like in the kernel and with free(),
        its safe to pass a NULL pointer to avoid having to check it before
        each and every foo__get() call (Arnaldo Carvalho de Melo)
      
       - Remove some dead code (quote.[ch]) (Arnaldo Carvalho de Melo)
      
       - Remove some needless globals, making them local (Arnaldo Carvalho de Melo)
      
       - Reduce usage of symbol_conf.use_callchain, using other means of
        finding out if callchains are in use or available for specific events,
        as we evolved this codebase to allow requesting callchains for just
        a subset of the monitored events. In time it will help polish
        recording and showing mixed sets accross the various tools:
      
          perf record -e cycles/call-graph=fp/,cache-misses/call-graph=dwarf/,instructions'
      
        (Arnaldo Carvalho de Melo)
      
       - Consider PTI entry trampolines in map__rip_2objdump() (Adrian Hunter)
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      2696ec45
    • J
      perf script python: Add dict fields introduction to Documentation · ac56aa45
      Jin Yao 提交于
      Add a brief introduction about fields to perf-script-python.txt.
      
      It should help python script developers in easily finding what fields
      are supported.
      Signed-off-by: NJin Yao <yao.jin@linux.intel.com>
      Reviewed-by: NAndi Kleen <ak@linux.intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jin Yao <yao.jin@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1527843663-32288-4-git-send-email-yao.jin@linux.intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      ac56aa45
    • J
      perf script python: Add more PMU fields to event handler dict · 48a1f565
      Jin Yao 提交于
      When doing pmu sampling and then running a script with perf script -s
      script.py, the process_event function gets dictionary with some fields
      from the perf ring buffer (like ip, sym, callchain etc).
      
      But we miss quite a few fields we report now, for example, LBRs, data
      source, weight, transaction, iregs, uregs, etc.
      
      This patch reports these fields for perf script python processing.
      
        New keys/items:
        ---------------
        key  : brstack
        items: from, to, from_dsoname, to_dsoname, mispred,
               predicted, in_tx, abort, cycles.
      
        key  : brstacksym
        items: from, to, pred, in_tx, abort (converted string)
      
        key  : datasrc
        key  : datasrc_decode (decoded string)
        key  : iregs
        key  : uregs
        key  : weight
        key  : transaction
      
        v2:
        ---
        Add new fields for dso.
        Use PyBool_FromLong() for mispred/predicted/in_tx/abort
      
      Committer notes:
      
      !sym->name isn't valid, as its not a pointer, its a [0] array, use
      !sym->name[0] instead, guaranteed to be the case by symbol__new.
      
      This was caught by just one of the containers:
      
        52    54.22 ubuntu:17.04                  : FAIL gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406
      
          CC       /tmp/build/perf/util/scripting-engines/trace-event-python.o
        util/scripting-engines/trace-event-python.c:534:20: error: address of array 'sym->name' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
                if (!sym || !sym->name)
                          ~~~~~~^~~~
        1 error generated.
        mv: cannot stat '/tmp/build/perf/util/scripting-engines/.trace-event-python.o.tmp': No such file or directory
        /git/linux/tools/build/Makefile.build:96: recipe for target '/tmp/build/perf/util/scripting-engines/trace-event-python.o' failed
        make[5]: *** [/tmp/build/perf/util/scripting-engines/trace-event-python.o] Error 1
      Signed-off-by: NJin Yao <yao.jin@linux.intel.com>
      Reviewed-by: NAndi Kleen <ak@linux.intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jin Yao <yao.jin@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1527843663-32288-3-git-send-email-yao.jin@linux.intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      48a1f565
  3. 06 6月, 2018 18 次提交
  4. 05 6月, 2018 9 次提交