1. 15 11月, 2012 10 次提交
  2. 09 11月, 2012 2 次提交
    • Z
      perf test: fix a build error on builtin-test · 12f8f74b
      Zheng Liu 提交于
      Recently I build perf and get a build error on builtin-test.c. The error is as
      following:
      
      $ make
          CC perf.o
          CC builtin-test.o
      cc1: warnings being treated as errors
      builtin-test.c: In function ‘sched__get_first_possible_cpu’:
      builtin-test.c:977: warning: implicit declaration of function ‘CPU_ALLOC’
      builtin-test.c:977: warning: nested extern declaration of ‘CPU_ALLOC’
      builtin-test.c:977: warning: assignment makes pointer from integer without a cast
      builtin-test.c:978: warning: implicit declaration of function ‘CPU_ALLOC_SIZE’
      builtin-test.c:978: warning: nested extern declaration of ‘CPU_ALLOC_SIZE’
      builtin-test.c:979: warning: implicit declaration of function ‘CPU_ZERO_S’
      builtin-test.c:979: warning: nested extern declaration of ‘CPU_ZERO_S’
      builtin-test.c:982: warning: implicit declaration of function ‘CPU_FREE’
      builtin-test.c:982: warning: nested extern declaration of ‘CPU_FREE’
      builtin-test.c:992: warning: implicit declaration of function ‘CPU_ISSET_S’
      builtin-test.c:992: warning: nested extern declaration of ‘CPU_ISSET_S’
      builtin-test.c:998: warning: implicit declaration of function ‘CPU_CLR_S’
      builtin-test.c:998: warning: nested extern declaration of ‘CPU_CLR_S’
      make: *** [builtin-test.o] Error 1
      
      This problem is introduced in 3e7c439a. CPU_ALLOC and related macros are
      missing in sched__get_first_possible_cpu function. In 54489c18, commiter
      mentioned that CPU_ALLOC has been removed. So CPU_ALLOC calls in this
      function are removed to let perf to be built.
      Signed-off-by: NVinson Lee <vlee@twitter.com>
      Signed-off-by: NZheng Liu <wenqing.lz@taobao.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Vinson Lee <vlee@twitter.com>
      Cc: Zheng Liu <wenqing.lz@taobao.com>
      Cc: stable@vger.kernel.org
      Link: http://lkml.kernel.org/r/1352422726-31114-1-git-send-email-vlee@twitter.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      12f8f74b
    • A
      perf machine: Move more methods to machine.[ch] · 69d2591a
      Arnaldo Carvalho de Melo 提交于
      This time out of map.[ch] mostly, just code move plus a buch of 'self'
      removal, using machine or machines instead.
      
      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: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-j1vtux3vnu6wzmrjutpxnjcz@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      69d2591a
  3. 02 11月, 2012 1 次提交
  4. 01 11月, 2012 1 次提交
  5. 25 10月, 2012 1 次提交
  6. 07 10月, 2012 1 次提交
  7. 27 9月, 2012 1 次提交
    • A
      perf test: Add test to check we correctly parse and match syscall open parms · eb2f2703
      Arnaldo Carvalho de Melo 提交于
      It will set up a syscall open tracepoint event, generate an open with
      invalid flags, then check those flags were the ones reported in the
      tracepoint fired.
      
      For the filename we need vfs:getname, but that will go thru some more
      iterations as the vfs getname codebase is going thru changes lately.
      
      When that is in I'll just check that the perf_evsel__newtp constructor
      is not bailing out and then add it to the evlist, catch the event and
      check the filename against the one used in the 'open' call used to
      trigger the event.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Eric Paris <eparis@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jeff Layton <jlayton@redhat.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: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-p5w9aq0jcbb91ghzqomowm16@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      eb2f2703
  8. 26 9月, 2012 1 次提交
  9. 25 9月, 2012 1 次提交
  10. 24 9月, 2012 1 次提交
  11. 15 9月, 2012 1 次提交
  12. 11 9月, 2012 1 次提交
    • I
      perf tools: Use __maybe_used for unused variables · 1d037ca1
      Irina Tirdea 提交于
      perf defines both __used and __unused variables to use for marking
      unused variables. The variable __used is defined to
      __attribute__((__unused__)), which contradicts the kernel definition to
      __attribute__((__used__)) for new gcc versions. On Android, __used is
      also defined in system headers and this leads to warnings like: warning:
      '__used__' attribute ignored
      
      __unused is not defined in the kernel and is not a standard definition.
      If __unused is included everywhere instead of __used, this leads to
      conflicts with glibc headers, since glibc has a variables with this name
      in its headers.
      
      The best approach is to use __maybe_unused, the definition used in the
      kernel for __attribute__((unused)). In this way there is only one
      definition in perf sources (instead of 2 definitions that point to the
      same thing: __used and __unused) and it works on both Linux and Android.
      This patch simply replaces all instances of __used and __unused with
      __maybe_unused.
      Signed-off-by: NIrina Tirdea <irina.tirdea@intel.com>
      Acked-by: NPekka Enberg <penberg@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Namhyung Kim <namhyung.kim@lge.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/r/1347315303-29906-7-git-send-email-irina.tirdea@intel.com
      [ committer note: fixed up conflict with a116e05d in builtin-sched.c ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      1d037ca1
  13. 09 9月, 2012 1 次提交
  14. 07 9月, 2012 2 次提交
    • A
      perf test: Add roundtrip test for hardware cache events · 49f20d72
      Arnaldo Carvalho de Melo 提交于
      That nicely catches the problem reported by Joel Uckelman in
      http://permalink.gmane.org/gmane.linux.kernel.perf.user/1016 :
      
        [root@sandy ~]# perf test
         1: vmlinux symtab matches kallsyms: Ok
         2: detect open syscall event: Ok
         3: detect open syscall event on all cpus: Ok
         4: read samples using the mmap interface: Ok
         5: parse events tests: Ok
         6: x86 rdpmc test: Ok
         7: Validate PERF_RECORD_* events & perf_sample fields: Ok
         8: Test perf pmu format parsing: Ok
         9: Test dso data interface: Ok
        10: roundtrip evsel->name check: FAILED!
      
        [root@sandy ~]# perf test -v 10
        10: roundtrip evsel->name check:
        --- start ---
        L1-dcache-misses != L1-dcache-load-misses
        L1-dcache-misses != L1-dcache-store-misses
        L1-dcache-misses != L1-dcache-prefetch-misses
        L1-icache-misses != L1-icache-load-misses
        L1-icache-misses != L1-icache-prefetch-misses
        LLC-misses != LLC-load-misses
        LLC-misses != LLC-store-misses
        LLC-misses != LLC-prefetch-misses
        dTLB-misses != dTLB-load-misses
        dTLB-misses != dTLB-store-misses
        dTLB-misses != dTLB-prefetch-misses
        iTLB-misses != iTLB-load-misses
        branch-misses != branch-load-misses
        node-misses != node-load-misses
        node-misses != node-store-misses
        node-misses != node-prefetch-misses
        ---- end ----
        roundtrip evsel->name check: FAILED!
      
        [root@sandy ~]#
      
      Now lemme apply Jiri's fix and try it again...
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Joel Uckelman <joel@lightboxtechnologies.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: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-bbewtxw0rfipp5qy1j3jtg5d@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      49f20d72
    • A
      perf test: Add round trip test for sw and hw event names · 8ad7013b
      Arnaldo Carvalho de Melo 提交于
      It basically traverses the hardware and software event name arrays
      creating an evlist with all events, then it uses perf_evsel__name to
      check that the name is the expected one.
      
      With it I noticed this problem:
      
      [root@sandy ~]# perf test 10
      10: roundtrip evsel->name check:invalid or unsupported event: 'CPU-migrations'
      Run 'perf list' for a list of valid events
       FAILED!
      
      Changed it to "cpu-migrations" in the software event arrays and it
      worked.
      
      This is to catch problems like the one reported by Joel Uckelman in
      http://permalink.gmane.org/gmane.linux.kernel.perf.user/1016
      
      Hardware cache events will be checked in the following patch.
      
      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: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-5jskfkuqvf2fi257zmni0ftz@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      8ad7013b
  15. 15 8月, 2012 2 次提交
    • A
      perf evlist: Introduce evsel list accessors · 0c21f736
      Arnaldo Carvalho de Melo 提交于
      To replace the longer list_entry constructs for things that are widely
      used:
      
      	perf_evlist__{first,last}(evlist)
      	perf_evsel__next(evsel)
      Acked-by: NJiri Olsa <jolsa@redhat.com>
      Acked-by: NNamhyung Kim <namhyung@gmail.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: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-ng7azq26wg1jd801qqpcozwp@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      0c21f736
    • J
      perf tools: Enable grouping logic for parsed events · 6a4bb04c
      Jiri Olsa 提交于
      This patch adds a functionality that allows to create event groups
      based on the way they are specified on the command line. Adding
      functionality to the '{}' group syntax introduced in earlier patch.
      
      The current '--group/-g' option behaviour remains intact. If you
      specify it for record/stat/top command, all the specified events
      become members of a single group with the first event as a group
      leader.
      
      With the new '{}' group syntax you can create group like:
        # perf record -e '{cycles,faults}' ls
      
      resulting in single event group containing 'cycles' and 'faults'
      events, with cycles event as group leader.
      
      All groups are created with regards to threads and cpus. Thus
      recording an event group within a 2 threads on server with
      4 CPUs will create 8 separate groups.
      
      Examples (first event in brackets is group leader):
      
        # 1 group (cpu-clock,task-clock)
        perf record --group -e cpu-clock,task-clock ls
        perf record -e '{cpu-clock,task-clock}' ls
      
        # 2 groups (cpu-clock,task-clock) (minor-faults,major-faults)
        perf record -e '{cpu-clock,task-clock},{minor-faults,major-faults}' ls
      
        # 1 group (cpu-clock,task-clock,minor-faults,major-faults)
        perf record --group -e cpu-clock,task-clock -e minor-faults,major-faults ls
        perf record -e '{cpu-clock,task-clock,minor-faults,major-faults}' ls
      
        # 2 groups (cpu-clock,task-clock) (minor-faults,major-faults)
        perf record -e '{cpu-clock,task-clock} -e '{minor-faults,major-faults}' \
         -e instructions ls
      
        # 1 group
        # (cpu-clock,task-clock,minor-faults,major-faults,instructions)
        perf record --group -e cpu-clock,task-clock \
         -e minor-faults,major-faults -e instructions ls perf record -e
      '{cpu-clock,task-clock,minor-faults,major-faults,instructions}' ls
      
      It's possible to use standard event modifier for a group, which spans
      over all events in the group and updates each event modifier settings,
      for example:
      
        # perf record -r '{faults:k,cache-references}:p'
      
      resulting in ':kp' modifier being used for 'faults' and ':p' modifier
      being used for 'cache-references' event.
      Reviewed-by: NNamhyung Kim <namhyung@kernel.org>
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Acked-by: NPeter Zijlstra <peterz@infradead.org>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ulrich Drepper <drepper@gmail.com>
      Link: http://lkml.kernel.org/n/tip-ho42u0wcr8mn1otkalqi13qp@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      6a4bb04c
  16. 02 8月, 2012 3 次提交
  17. 25 7月, 2012 1 次提交
    • J
      perf test: Add dso data caching tests · f7add556
      Jiri Olsa 提交于
      Adding automated test for DSO data reading. Testing raw/cached reads
      from different file/cache locations.
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Arun Sharma <asharma@fb.com>
      Cc: Benjamin Redelings <benjamin.redelings@nescent.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Cyrill Gorcunov <gorcunov@openvz.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Robert Richter <robert.richter@amd.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Cc: Ulrich Drepper <drepper@gmail.com>
      Link: http://lkml.kernel.org/r/1342959280-5361-18-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      f7add556
  18. 20 6月, 2012 1 次提交
  19. 22 5月, 2012 1 次提交
  20. 17 5月, 2012 1 次提交
  21. 03 5月, 2012 3 次提交
  22. 17 4月, 2012 1 次提交
  23. 23 3月, 2012 1 次提交
  24. 17 3月, 2012 1 次提交