1. 13 2月, 2016 1 次提交
  2. 20 11月, 2015 1 次提交
    • A
      perf tests: Pass the subtest index to each test routine · 721a1f53
      Arnaldo Carvalho de Melo 提交于
      Some tests have sub-tests we want to run, so allow passing this.
      
      Wang tried to avoid having to touch all tests, but then, having the
      test.func in an anonymous union makes the build fail on older compilers,
      like the one in RHEL6, where:
      
        test a = {
      	.func = foo,
        };
      
      fails.
      
      To fix it leave the func pointer in the main structure and pass the subtest
      index to all tests, end result function is the same, but we have just one
      function pointer, not two, with and without the subtest index as an argument.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/n/tip-5genj0ficwdmelpoqlds0u4y@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      721a1f53
  3. 20 10月, 2015 1 次提交
  4. 06 10月, 2015 1 次提交
  5. 14 9月, 2015 2 次提交
  6. 13 8月, 2015 1 次提交
  7. 30 7月, 2015 1 次提交
    • J
      perf tools: Force period term to overload global settings · ee4c7588
      Jiri Olsa 提交于
      Currently the command line option settings beats the per event period
      settings:
      
      With no global settings, we get per-event configuration:
      
        $ perf record -e 'cpu/instructions,period=20000/' sleep 1
        $ perf evlist -v
        ... { sample_period, sample_freq }: 20000 ...
      
      With 'c' option period setup, we get 'c' option value:
        $ perf record -e 'cpu/instructions,period=20000/' -c 1000 sleep 1
        $ perf evlist -v
        ... { sample_period, sample_freq }: 1000 ...
      
      This patch makes the per-event settings overload the global 'c' option
      setup:
      
        $ perf record -e 'cpu/instructions,period=20000/' -c 1000 sleep 1
        $ perf evlist -v
        ... { sample_period, sample_freq }: 20000 ...
      
      I think the making the per-event settings to overload any other config
      makes more sense than current state. However it breaks the current
      'period' term handling, which might cause some noise.. so let's see ;-).
      
      Also fixing parse event tests with the new behaviour.
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Kan Liang <kan.liang@intel.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: http://lkml.kernel.org/r/1438162936-59698-3-git-send-email-kan.liang@intel.comSigned-off-by: NKan Liang <kan.liang@intel.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      ee4c7588
  8. 29 5月, 2015 1 次提交
  9. 29 4月, 2015 1 次提交
    • J
      perf tools: Add parse_events_error interface · b39b8393
      Jiri Olsa 提交于
      Adding support to return error information from parse_events function.
      Following struct will be populated by parse_events function on return:
      
        struct parse_events_error {
          int   idx;
          char *str;
          char *help;
        };
      
      where 'idx' is the position in the string where the parsing failed,
      'str' contains dynamically allocated error string describing the error
      and 'help' is optional help string.
      
      The change contains reporting function, which currently does not display
      anything. The code changes to supply error data for specific event types
      are coming in next patches. However this is what the expected output is:
      
        $ sudo perf record -e 'sched:krava' ls
        event syntax error: 'sched:krava'
                             \___ unknown tracepoint
        ...
      
        $ perf record -e 'cpu/even=0x1/' ls
        event syntax error: 'cpu/even=0x1/'
                                 \___ unknown term
      
        valid terms: pc,any,inv,edge,cmask,event,in_tx,ldlat,umask,in_tx_cp,offcore_rsp,config,config1,config2,name,period,branch_type
        ...
      
        $ perf record -e cycles,cache-mises ls
        event syntax error: '..es,cache-mises'
                                       \___ parser error
        ...
      
      The output functions cut the beginning of the event string so the error
      starts up to 10th character and cut the end of the string of it crosses
      the terminal width.
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1429729824-13932-2-git-send-email-jolsa@kernel.org
      [ Renamed 'error' variables to 'err', not to clash with util.h error() ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b39b8393
  10. 08 4月, 2015 1 次提交
  11. 11 2月, 2015 1 次提交
  12. 22 1月, 2015 1 次提交
  13. 03 12月, 2014 1 次提交
  14. 16 10月, 2014 1 次提交
    • K
      perf test: Add test case for pmu event new style format · ffe59788
      Kan Liang 提交于
      Add test case in automated tests suite. It checks not only the two types
      of pmu event stytle formats "pmu_event_name" and "cpu/pmu_event_name/",
      but also the different formats mixtures which are more likely to trigger
      parse issue.
      
      The patch set including this one has been tested by the perf automated
      test:
      
         ./perf test parse -v"
      
      On haswell, ivybridge and Romley platform.
      
      The patch set also has been tested on haswell by the following script.
      
      Note: please make sure that your test system support TSX and
      L1-dcache-loads events. Otherwise, you may want to change the events to
      other pmu events.
      
        [lk@localhost ~]$ cat perf_style_test.sh
        # hardware events + kernel pmu event with different style
        perf stat -x, -e cycles,mem-stores,tx-start sleep 2
        perf stat -x, -e cpu-cycles,cycles-ct,cycles-t sleep 2
        perf stat -x, -e cycles,cpu/cycles-ct/,cpu/cycles-t/ sleep 2
        perf stat -x, -e instructions,cpu/tx-start/ sleep 2
        perf stat -x, -e '{cycles,tx-start}' sleep 2
        perf stat -x, -e '{cycles,cpu/tx-start/}' sleep 2
      
        # HW Cache event + kernel pmu event with different style
        perf stat -x, -e L1-dcache-loads,cpu/mem-stores/,tx-start sleep 2
        perf stat -x, -e L1-dcache-loads,mem-stores,cpu/tx-start/ sleep 2
        perf stat -x, -e '{L1-dcache-loads,mem-stores}' sleep 2
        perf stat -x, -e '{L1-dcache-loads,cpu/tx-start/}' sleep 2
      
        # Raw event + kernel pmu event with different style:
        perf stat -x, -e cpu/event=0xc0,umask=0x00/,mem-loads,cpu/mem-stores/ sleep 2
        perf stat -x, -e cpu/event=0xc0,umask=0x00/,tx-start,cpu/el-start/ sleep 2
        perf stat -x, -e '{cpu/event=0xc0,umask=0x00/,tx-start}' sleep 2
      Signed-off-by: NKan Liang <kan.liang@intel.com>
      Acked-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lkml.kernel.org/r/1412694532-23391-5-git-send-email-kan.liang@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      ffe59788
  15. 17 7月, 2014 1 次提交
  16. 29 4月, 2014 2 次提交
  17. 18 2月, 2014 1 次提交
    • B
      perf tools: Move fs.* to lib/api/fs/ · cd0cfad7
      Borislav Petkov 提交于
      Move to generic library and kill magic.h as it is needed only in fs.h.
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Pekka Enberg <penberg@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Robert Richter <rric@kernel.org>
      Cc: Stanislav Fomichev <stfomichev@yandex-team.ru>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/r/1386605664-24041-3-git-send-email-bp@alien8.deSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      cd0cfad7
  18. 13 1月, 2014 2 次提交
  19. 17 12月, 2013 1 次提交
    • B
      tools/: Convert to new topic libraries · 553873e1
      Borislav Petkov 提交于
      Move debugfs.* to api/fs/. We have a common tools/lib/api/ place where
      the Makefile lives and then we place the headers in subdirs.
      
      For example, all the fs-related stuff goes to tools/lib/api/fs/ from
      which we get libapikfs.a (acme got almost the naming he wanted :-)) and
      we link it into the tools which need it - in this case perf and
      tools/vm/page-types.
      
      acme:
      
      "Looking at the implementation, I think some tools can even link
      directly to the .o files, avoiding the .a file altogether.
      
      But that is just an optimization/finer granularity tools/lib/
      cherrypicking that toolers can make use of."
      
      Fixup documentation cleaning target while at it.
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Acked-by: NIngo Molnar <mingo@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Pekka Enberg <penberg@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Robert Richter <rric@kernel.org>
      Cc: Stanislav Fomichev <stfomichev@yandex-team.ru>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/r/1386605664-24041-2-git-send-email-bp@alien8.deSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      553873e1
  20. 15 11月, 2013 1 次提交
  21. 06 11月, 2013 2 次提交
  22. 08 8月, 2013 2 次提交
  23. 13 7月, 2013 2 次提交
  24. 12 4月, 2013 1 次提交
  25. 16 3月, 2013 2 次提交
  26. 07 2月, 2013 1 次提交
  27. 01 2月, 2013 1 次提交
  28. 25 1月, 2013 4 次提交
  29. 09 12月, 2012 1 次提交
  30. 15 11月, 2012 1 次提交