1. 05 12月, 2011 1 次提交
  2. 03 12月, 2011 1 次提交
  3. 02 12月, 2011 2 次提交
    • A
      perf test: Validate PERF_RECORD_ events and perf_sample fields · 3e7c439a
      Arnaldo Carvalho de Melo 提交于
      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: NArnaldo Carvalho de Melo <acme@redhat.com>
      3e7c439a
    • A
      perf event: Introduce perf_event__fprintf · 482ad897
      Arnaldo Carvalho de Melo 提交于
      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: NArnaldo Carvalho de Melo <acme@redhat.com>
      482ad897
  4. 30 11月, 2011 1 次提交
    • A
      perf test: Allow running just a subset of the available tests · e60770a0
      Arnaldo Carvalho de Melo 提交于
      To obtain a list of available tests:
      
      [root@emilia linux]# perf test list
       1: vmlinux symtab matches kallsyms
       2: detect open syscall event
       3: detect open syscall event on all cpus
       4: read samples using the mmap interface
       5: parse events tests
      [root@emilia linux]#
      
      To list just a subset:
      
      [root@emilia linux]# perf test list syscall
       2: detect open syscall event
       3: detect open syscall event on all cpus
      [root@emilia linux]#
      
      To run a subset:
      
      [root@emilia linux]# perf test detect
       2: detect open syscall event: Ok
       3: detect open syscall event on all cpus: Ok
      [root@emilia linux]#
      
      Specific tests can be chosen by number:
      
      [root@emilia linux]# perf test 1 3 parse
       1: vmlinux symtab matches kallsyms: Ok
       3: detect open syscall event on all cpus: Ok
       5: parse events tests: Ok
      [root@emilia linux]#
      
      Now to write more tests!
      Suggested-by: NPeter Zijlstra <peterz@infradead.org>
      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-nqec2145qfxdgimux28aw7v8@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      e60770a0
  5. 29 11月, 2011 2 次提交
    • A
      perf evlist: Always do automatic allocation of pollfd and mmap structures · 806fb630
      Arnaldo Carvalho de Melo 提交于
      At first tools were required to do that, but while writing the python
      bindings to simplify the API I made them auto-allocate when needed.
      
      This just makes record, stat and top use that auto allocation,
      simplifying them a bit.
      
      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-iokhcvkzzijr3keioubx8hlq@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      806fb630
    • A
      perf tools: Save some loops using perf_evlist__id2evsel · ee29be62
      Arnaldo Carvalho de Melo 提交于
      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: NArnaldo Carvalho de Melo <acme@redhat.com>
      ee29be62
  6. 28 11月, 2011 24 次提交
  7. 15 11月, 2011 1 次提交
  8. 14 11月, 2011 2 次提交
  9. 11 11月, 2011 1 次提交
  10. 10 11月, 2011 1 次提交
  11. 09 11月, 2011 4 次提交
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux · 19e0bafc
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux:
        drivers/media: video/a5k6aa is a module and so needs module.h
        mfd: fix build failures in recently added ab5500 code
        hwspinlock/u8500: include linux/module.h
        MTD: MAPS: bcm963xx-flash.c: explicitly include module.h
      19e0bafc
    • L
      Merge branch 'for-linus' of git://neil.brown.name/md · ed72a3d1
      Linus Torvalds 提交于
      * 'for-linus' of git://neil.brown.name/md:
        md/raid5: STRIPE_ACTIVE has lock semantics, add barriers
        md/raid5: abort any pending parity operations when array fails.
      ed72a3d1
    • L
      Merge branch 'docs-move' of git://git.kernel.org/pub/scm/linux/kernel/git/rdunlap/linux-docs · c8c27c95
      Linus Torvalds 提交于
      * 'docs-move' of git://git.kernel.org/pub/scm/linux/kernel/git/rdunlap/linux-docs: (45 commits)
        DocBook/drm: Clean up a todo-note
        DocBook/drm: `device aware' -> `device-aware'
        DocBook/drm: `(device|driver) specific' -> `(device|driver)-specific'
        DocBook/drm: Clean up the paragraph on framebuffer objects
        DocBook/drm: Use `; otherwise,'
        DocBook/drm: Better flow with `, and then'
        DocBook/drm: Refer to the domain-setting function as a device-specific ioctl
        DocBook/drm: Improve flow of GPU/CPU coherence sentence
        DocBook/drm: Use an <itemizelist> for fundamental GEM operations
        DocBook/drm: Insert a comma
        DocBook/drm: Use a <variablelist> for vblank ioctls
        DocBook/drm: Use an itemizedlist for what an encoder needs to provide
        DocBook/drm: Insert `the' for readability, and change `set' to `setting'
        DocBook/drm: Remove extraneous commas
        DocBook/drm: Use a colon
        DocBook/drm: Clarify `final initialization' via better formatting
        DocBook/drm: Remove redundancy
        DocBook/drm: Insert `it' for smooth reading
        DocBook/drm: The word `so-called'; I do not think it connotes what you think it connotes
        DocBook/drm: Use a singular subject for grammatical cleanliness
        ...
      c8c27c95
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest · 98393b8f
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest: (21 commits)
        ktest: Evaluate variables entered on the command line
        ktest: Add variable ${PWD}
        ktest: Add another monitor flush before installing kernel
        ktest: Do not opencode reboot in grub setting
        ktest: Add processing of complex conditionals
        ktest: Fix parsing of config section lines
        ktest: Sort make_min_config configs by dependecies
        ktest: Add DEFINED keyword for IF statements
        ktest: Add OVERRIDE keyword to DEFAULTS section
        ktest: Consolidate TEST_TYPE and DEFAULT code
        ktest: Add INCLUDE keyword to include other config files
        ktest: Let IF keyword take comparisons
        ktest: Add IF and ELSE to config sections
        ktest: Do not reboot on config or build issues
        ktest: Add option REBOOT_SUCCESS_LINE to stop waiting after a reboot
        ktest: Add NO_INSTALL option to not install for a test
        ktest: Fail when grub menu not found
        ktest: Include monitor in reboot code
        ktest: Only need to save .config when doing mrproper
        ktest: Create outputdir if it does not exist
        ...
      98393b8f