1. 12 Dec, 2011 1 commit
  2. 06 Dec, 2011 14 commits
  3. 05 Dec, 2011 17 commits
  4. 02 Dec, 2011 4 commits
    • Arnaldo Carvalho de Melo's avatar
      perf test: Soft errors shouldn't stop the "Validate PERF_RECORD_" test · f71c49e5
      Arnaldo Carvalho de Melo authored
      For errors that don't preclude checking for further errors, aka "soft"
      errors, just  continue testing for other errors.
      
      Better coverage in verbose mode.
      Suggested-by: default avatarDavid Ahern <dsahern@gmail.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>
      Link: http://lkml.kernel.org/n/tip-jafcokbj26m845dsgm2hx6az@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f71c49e5
    • Arnaldo Carvalho de Melo's avatar
      perf test: Validate PERF_RECORD_ events and perf_sample fields · 3e7c439a
      Arnaldo Carvalho de Melo authored
      This new test will validate these new routines extracted from 'perf
      record':
      
       - perf_evlist__config_attrs
       - perf_evlist__prepare_workload
       - perf_evlist__start_workload
      
      In addition to several other perf_evlist methods.
      
      It consists of starting a simple workload, setting up just one event to
      monitor ("cycles") requesting that several PERF_SAMPLE_ fields be
      present in all events.
      
      It then will check that the expected PERF_RECORD_ events are produced
      and will sanity check all its fields.
      
      Some checks performed:
      
      . PERF_SAMPLE_TIME monotonically increases.
      
      . PERF_SAMPLE_CPU is the one requested with sched_setaffinity
      
      . PERF_SAMPLE_TID and PERF_SAMPLE_PID matches the one we forked
        in perf_evlist__prepare_workload and that is stored in
        evlist->workload.pid
      
      . For the events where these fields are also present in its
        pre-sample_id_all fields (e.g. event->mmap.pid), that they are what
        is expected too.
      
      . That we get a bunch of mmaps:
      
        PATH/libcSUFFIX
        PATH/ldSUFFIX
        [vdso]
        PATH/sleep
      
      Example:
      
        [root@emilia ~]# taskset -c 3,4 perf test -v1 perf_sample
         6: Validate PERF_RECORD_* events & perf_sample fields:
        --- start ---
        7159480799825 3 PERF_RECORD_SAMPLE
        7159480805584 3 PERF_RECORD_SAMPLE
        7159480807814 3 PERF_RECORD_SAMPLE
        7159480810430 3 PERF_RECORD_SAMPLE
        7159480861511 3 PERF_RECORD_MMAP 8086/8086: [0x7fffffffd000(0x2000) @ 0x7fffffffd000]: //anon
        7159481052516 3 PERF_RECORD_COMM: sleep:8086
        7159481070188 3 PERF_RECORD_MMAP 8086/8086: [0x400000(0x6000) @ 0]: /bin/sleep
        7159481077104 3 PERF_RECORD_MMAP 8086/8086: [0x3d06400000(0x221000) @ 0]: /lib64/ld-2.12.so
        7159481092912 3 PERF_RECORD_MMAP 8086/8086: [0x7fff1adff000(0x1000) @ 0x7fff1adff000]: [vdso]
        7159481196779 3 PERF_RECORD_MMAP 8086/8086: [0x3d06800000(0x37f000) @ 0]: /lib64/libc-2.12.so
        7160481558435 3 PERF_RECORD_EXIT(8086:8086):(8086:8086)
        ---- end ----
        Validate PERF_RECORD_* events & perf_sample fields: Ok
        [root@emilia ~]#
      
      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>
      Link: http://lkml.kernel.org/n/tip-svag18v2z4idas0dyz3umjpq@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3e7c439a
    • Arnaldo Carvalho de Melo's avatar
      perf event: Introduce perf_event__fprintf · 482ad897
      Arnaldo Carvalho de Melo authored
      So that tools like 'perf test' can print the events when in verbose
      mode, for instance.
      
      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>
      Link: http://lkml.kernel.org/n/tip-xnovdqfi25nc48gy6604k7yp@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      482ad897
    • Tejun Heo's avatar
      trace_events_filter: Use rcu_assign_pointer() when setting ftrace_event_call->filter · d3d9acf6
      Tejun Heo authored
      ftrace_event_call->filter is sched RCU protected but didn't use
      rcu_assign_pointer().  Use it.
      
      TODO: Add proper __rcu annotation to call->filter and all its users.
      
      -v2: Use RCU_INIT_POINTER() for %NULL clearing as suggested by Eric.
      
      Link: http://lkml.kernel.org/r/20111123164949.GA29639@google.com
      
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: stable@kernel.org # (2.6.39+)
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      d3d9acf6
  5. 29 Nov, 2011 2 commits
  6. 28 Nov, 2011 2 commits
    • Arnaldo Carvalho de Melo's avatar
      perf tools: Save some loops using perf_evlist__id2evsel · ee29be62
      Arnaldo Carvalho de Melo authored
      Since we already ask for PERF_SAMPLE_ID and use it to quickly find the
      associated evsel, add handler func + data to struct perf_evsel to avoid
      using chains of if(strcmp(event_name)) and also to avoid all the linear
      list searches via trace_event_find.
      
      To demonstrate the technique convert 'perf sched' to it:
      
       # perf sched record sleep 5m
      
      And then:
      
       Performance counter stats for '/tmp/oldperf sched lat':
      
              646.929438 task-clock                #    0.999 CPUs utilized
                       9 context-switches          #    0.000 M/sec
                       0 CPU-migrations            #    0.000 M/sec
                  20,901 page-faults               #    0.032 M/sec
           1,290,144,450 cycles                    #    1.994 GHz
         <not supported> stalled-cycles-frontend
         <not supported> stalled-cycles-backend
           1,606,158,439 instructions              #    1.24  insns per cycle
             339,088,395 branches                  #  524.151 M/sec
               4,550,735 branch-misses             #    1.34% of all branches
      
             0.647524759 seconds time elapsed
      
      Versus:
      
       Performance counter stats for 'perf sched lat':
      
              473.564691 task-clock                #    0.999 CPUs utilized
                       9 context-switches          #    0.000 M/sec
                       0 CPU-migrations            #    0.000 M/sec
                  20,903 page-faults               #    0.044 M/sec
             944,367,984 cycles                    #    1.994 GHz
         <not supported> stalled-cycles-frontend
         <not supported> stalled-cycles-backend
           1,442,385,571 instructions              #    1.53  insns per cycle
             308,383,106 branches                  #  651.195 M/sec
               4,481,784 branch-misses             #    1.45% of all branches
      
             0.474215751 seconds time elapsed
      
      [root@emilia ~]#
      
      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>
      Link: http://lkml.kernel.org/n/tip-1kbzpl74lwi6lavpqke2u2p3@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ee29be62
    • David Ahern's avatar
      perf script: Add comm filtering option · e7984b7b
      David Ahern authored
      Allows collecting events system wide and then pulling out events for a
      specific task name(s). e.g,
      
          perf script -c gnome-shell,gnome-terminal
      
      Applies on top of:
          https://lkml.org/lkml/2011/11/13/74
      
      v2->v3
      - update Documentation
      
      v1->v2
      - use comm_list from symbol_conf
      
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1321894972-24246-1-git-send-email-dsahern@gmail.comSigned-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e7984b7b