1. 21 9月, 2009 16 次提交
    • I
      perf: Do the big rename: Performance Counters -> Performance Events · cdd6c482
      Ingo Molnar 提交于
      Bye-bye Performance Counters, welcome Performance Events!
      
      In the past few months the perfcounters subsystem has grown out its
      initial role of counting hardware events, and has become (and is
      becoming) a much broader generic event enumeration, reporting, logging,
      monitoring, analysis facility.
      
      Naming its core object 'perf_counter' and naming the subsystem
      'perfcounters' has become more and more of a misnomer. With pending
      code like hw-breakpoints support the 'counter' name is less and
      less appropriate.
      
      All in one, we've decided to rename the subsystem to 'performance
      events' and to propagate this rename through all fields, variables
      and API names. (in an ABI compatible fashion)
      
      The word 'event' is also a bit shorter than 'counter' - which makes
      it slightly more convenient to write/handle as well.
      
      Thanks goes to Stephane Eranian who first observed this misnomer and
      suggested a rename.
      
      User-space tooling and ABI compatibility is not affected - this patch
      should be function-invariant. (Also, defconfigs were not touched to
      keep the size down.)
      
      This patch has been generated via the following script:
      
        FILES=$(find * -type f | grep -vE 'oprofile|[^K]config')
      
        sed -i \
          -e 's/PERF_EVENT_/PERF_RECORD_/g' \
          -e 's/PERF_COUNTER/PERF_EVENT/g' \
          -e 's/perf_counter/perf_event/g' \
          -e 's/nb_counters/nb_events/g' \
          -e 's/swcounter/swevent/g' \
          -e 's/tpcounter_event/tp_event/g' \
          $FILES
      
        for N in $(find . -name perf_counter.[ch]); do
          M=$(echo $N | sed 's/perf_counter/perf_event/g')
          mv $N $M
        done
      
        FILES=$(find . -name perf_event.*)
      
        sed -i \
          -e 's/COUNTER_MASK/REG_MASK/g' \
          -e 's/COUNTER/EVENT/g' \
          -e 's/\<event\>/event_id/g' \
          -e 's/counter/event/g' \
          -e 's/Counter/Event/g' \
          $FILES
      
      ... to keep it as correct as possible. This script can also be
      used by anyone who has pending perfcounters patches - it converts
      a Linux kernel tree over to the new naming. We tried to time this
      change to the point in time where the amount of pending patches
      is the smallest: the end of the merge window.
      
      Namespace clashes were fixed up in a preparatory patch - and some
      stylistic fallout will be fixed up in a subsequent patch.
      
      ( NOTE: 'counters' are still the proper terminology when we deal
        with hardware registers - and these sed scripts are a bit
        over-eager in renaming them. I've undone some of that, but
        in case there's something left where 'counter' would be
        better than 'event' we can undo that on an individual basis
        instead of touching an otherwise nicely automated patch. )
      Suggested-by: NStephane Eranian <eranian@google.com>
      Acked-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: NPaul Mackerras <paulus@samba.org>
      Reviewed-by: NArjan van de Ven <arjan@linux.intel.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: <linux-arch@vger.kernel.org>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      cdd6c482
    • I
      perf_counter: Rename 'event' to event_id/hw_event · dfc65094
      Ingo Molnar 提交于
      In preparation to the renames, to avoid a namespace clash.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      dfc65094
    • I
      perf_counter: Rename list_entry -> group_entry, counter_list -> group_list · 65abc865
      Ingo Molnar 提交于
      This is in preparation of the big rename, but also makes sense
      in a standalone way: 'list_entry' is a bad name as we already
      have a list_entry() in list.h.
      
      Also, the 'counter list' is too vague, it doesnt tell us the
      purpose of that list.
      
      Clarify these names to show that it's all about the group
      hiearchy.
      Acked-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      65abc865
    • I
      Merge branch 'linus' into perfcounters/rename · ae82bfd6
      Ingo Molnar 提交于
      Merge reason: pull in all the latest code before doing the rename.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ae82bfd6
    • P
      perf_counter, powerpc, sparc: Fix compilation after perf_counter_overflow() change · cd74c86b
      Paul Mackerras 提交于
      Commit 5622f295 ("x86, perf_counter, bts: Optimize BTS overflow
      handling") removed the regs field from struct perf_sample_data and
      added a regs parameter to perf_counter_overflow().  This breaks the
      build on powerpc (and Sparc) as reported by Sachin Sant:
      
        arch/powerpc/kernel/perf_counter.c: In function 'record_and_restart':
        arch/powerpc/kernel/perf_counter.c:1165: error: unknown field 'regs' specified in initializer
      
      This adjusts arch/powerpc/kernel/perf_counter.c to correspond with the
      new struct perf_sample_data and perf_counter_overflow().
      
      [ v2: also fix Sparc, Markus Metzger <markus.t.metzger@intel.com> ]
      Reported-by: NSachin Sant <sachinp@in.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Cc: Markus Metzger <markus.t.metzger@intel.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: benh@kernel.crashing.org
      Cc: linuxppc-dev@ozlabs.org
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <19127.8400.376239.586120@drongo.ozlabs.ibm.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      cd74c86b
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6 · ebc79c4f
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6:
        includecheck fix: x86, cpu/common.c
        includecheck fix: kernel/trace, ring_buffer.c
        includecheck fix: include/linux, ftrace.h
        includecheck fix: include/linux, page_cgroup.h
        includecheck fix: include/linux, aio.h
        includecheck fix: include/drm, drm_memory.h
        includecheck fix: include/acpi, acpi_bus.h
        includecheck fix: drivers/xen, evtchn.c
        includecheck fix: drivers/video, vgacon.c
        includecheck fix: drivers/scsi, ibmvscsi.c
        includecheck fix: drivers/scsi, libfcoe.c
        includecheck fix: x86, shadow.c
        includecheck fix: x86, traps.c
        includecheck fix: um, helper.c
        includecheck fix: s390, sys_s390.c
      ebc79c4f
    • L
      loongson: fix cut-and-paste mis-merge · dcbb5593
      Linus Torvalds 提交于
      Ingo points out that I screwed up when merging the 'timers-for-linus'
      branch in commit a03fdb76.
      
      A bit too much copy-and-pasting caused the end result to have an
      extraneous 'return' in the middle of an expression.  That was obviously
      bogus.  Blush.
      
      Reported-by-with-patch: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      dcbb5593
    • L
      Merge branch 'next-i2c' of git://aeryn.fluff.org.uk/bjdooks/linux · 996a798a
      Linus Torvalds 提交于
      * 'next-i2c' of git://aeryn.fluff.org.uk/bjdooks/linux:
        [PATCH] i2c-imx: make bus available early
        i2c-mv64xxx: correct mv64xxx_i2c_intr() return type
      996a798a
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6 · a57c21c7
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
        Driver-Core: extend devnode callbacks to provide permissions
      a57c21c7
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 · e11c675e
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (79 commits)
        USB serial: update the console driver
        usb-serial: straighten out serial_open
        usb-serial: add missing tests and debug lines
        usb-serial: rename subroutines
        usb-serial: fix termios initialization logic
        usb-serial: acquire references when a new tty is installed
        usb-serial: change logic of serial lookups
        usb-serial: put subroutines in logical order
        usb-serial: change referencing of port and serial structures
        tty: Char: mxser, use THRE for ASPP_OQUEUE ioctl
        tty: Char: mxser, add support for CP112UL
        uartlite: support shared interrupt lines
        tty: USB: serial/mct_u232, fix tty refcnt
        tty: riscom8, fix tty refcnt
        tty: riscom8, fix shutdown declaration
        TTY: fix typos
        tty: Power: fix suspend vt regression
        tty: vt: use printk_once
        tty: handle VT specific compat ioctls in vt driver
        n_tty: move echoctl check and clean up logic
        ...
      e11c675e
    • L
      Merge branch 'perfcounters-core-for-linus' of... · 467f9957
      Linus Torvalds 提交于
      Merge branch 'perfcounters-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'perfcounters-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (58 commits)
        perf_counter: Fix perf_copy_attr() pointer arithmetic
        perf utils: Use a define for the maximum length of a trace event
        perf: Add timechart help text and add timechart to "perf help"
        tracing, x86, cpuidle: Move the end point of a C state in the power tracer
        perf utils: Be consistent about minimum text size in the svghelper
        perf timechart: Add "perf timechart record"
        perf: Add the timechart tool
        perf: Add a SVG helper library file
        tracing, perf: Convert the power tracer into an event tracer
        perf: Add a sample_event type to the event_union
        perf: Allow perf utilities to have "callback" options without arguments
        perf: Store trace event name/id pairs in perf.data
        perf: Add a timestamp to fork events
        sched_clock: Make it NMI safe
        perf_counter: Fix up swcounter throttling
        x86, perf_counter, bts: Optimize BTS overflow handling
        perf sched: Add --input=file option to builtin-sched.c
        perf trace: Sample timestamp and cpu when using record flag
        perf tools: Increase MAX_EVENT_LENGTH
        perf tools: Fix memory leak in read_ftrace_printk()
        ...
      467f9957
    • P
      perf_counter: x86: Fix PMU resource leak · a1792cda
      Peter Zijlstra 提交于
      Dave noticed that we leak the PMU resource reservations when we
      fail the hardware counter init.
      Reported-by: NDavid Miller <davem@davemloft.net>
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: NDavid Miller <davem@davemloft.net>
      LKML-Reference: <1252483487.7746.164.camel@twins>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a1792cda
    • A
      perf util: SVG performance improvements · 611a546b
      Arjan van de Ven 提交于
      Tweak the output SVG to increase performance in SVG viewers by
      limiting the different types of font sizes and by smarter
      transformations on the text.
      
      At least with Inkscape this gives a notable performance improvement
      during zoom and scrolling.
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20090920181438.3a49cb93@linux.intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      611a546b
    • A
      perf util: Make the timechart SVG width dynamic · 5094b655
      Arjan van de Ven 提交于
      This patch adds a command line option for timechart that allows the
      user to specify the width of the SVG file.
      
      This patch also makes sure that each second of recording has at
      least 200 units (pixels at 96 DPI) of width.  This impacts
      recordings longer than 5 seconds; recordings shorter than 5 second
      will scale up to have a width of 1000 units for the whole recording
      (as before).
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20090920181416.69570c5d@linux.intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      5094b655
    • A
      perf timechart: Show the duration of scheduler delays in the SVG · a92fe7b3
      Arjan van de Ven 提交于
      Given that scheduler latencies are the hot thing nowadays, show the
      duration of said latencies in the SVG in text form.
      
      In addition, if the latency is more than 10 msec, pick a brighter
      yellow color as a way to point these long delays out.
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20090920181353.796f4509@linux.intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a92fe7b3
    • A
      perf timechart: Show the name of the waker/wakee in timechart · 4f1202c8
      Arjan van de Ven 提交于
      Timechart currently shows thin green lines for sending or receiving
      wakeups. This patch also prints (in a very small font) the name of
      the process that is being woken/wakes up this process.
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20090920181328.68baa978@linux.intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      4f1202c8
  2. 20 9月, 2009 24 次提交