1. 16 Feb, 2011 8 commits
    • Stephane Eranian's avatar
      perf tool: Add cgroup support · 023695d9
      Stephane Eranian authored
      This patch adds the ability to filter monitoring based on container groups
      (cgroups) for both perf stat and perf record. It is possible to monitor
      multiple cgroup in parallel. There is one cgroup per event. The cgroups to
      monitor are passed via a new -G option followed by a comma separated list of
      cgroup names.
      
      The cgroup filesystem has to be mounted. Given a cgroup name, the perf tool
      finds the corresponding directory in the cgroup filesystem and opens it. It
      then passes that file descriptor to the kernel.
      
      Example:
      
      $ perf stat -B -a -e cycles:u,cycles:u,cycles:u -G test1,,test2 -- sleep 1
       Performance counter stats for 'sleep 1':
      
            2,368,667,414  cycles                   test1
            2,369,661,459  cycles
            <not counted>  cycles                   test2
      
              1.001856890  seconds time elapsed
      Signed-off-by: default avatarStephane Eranian <eranian@google.com>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <4d590290.825bdf0a.7d0a.4890@mx.google.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      023695d9
    • Stephane Eranian's avatar
      perf: Add cgroup support · e5d1367f
      Stephane Eranian authored
      This kernel patch adds the ability to filter monitoring based on
      container groups (cgroups). This is for use in per-cpu mode only.
      
      The cgroup to monitor is passed as a file descriptor in the pid
      argument to the syscall. The file descriptor must be opened to
      the cgroup name in the cgroup filesystem. For instance, if the
      cgroup name is foo and cgroupfs is mounted in /cgroup, then the
      file descriptor is opened to /cgroup/foo. Cgroup mode is
      activated by passing PERF_FLAG_PID_CGROUP in the flags argument
      to the syscall.
      
      For instance to measure in cgroup foo on CPU1 assuming
      cgroupfs is mounted under /cgroup:
      
      struct perf_event_attr attr;
      int cgroup_fd, fd;
      
      cgroup_fd = open("/cgroup/foo", O_RDONLY);
      fd = perf_event_open(&attr, cgroup_fd, 1, -1, PERF_FLAG_PID_CGROUP);
      close(cgroup_fd);
      Signed-off-by: default avatarStephane Eranian <eranian@google.com>
      [ added perf_cgroup_{exit,attach} ]
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <4d590250.114ddf0a.689e.4482@mx.google.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      e5d1367f
    • Peter Zijlstra's avatar
      cgroup: Fix cgroup_subsys::exit callback · d41d5a01
      Peter Zijlstra authored
      Make the ::exit method act like ::attach, it is after all very nearly
      the same thing.
      
      The bug had no effect on correctness - fixing it is an optimization for
      the scheduler. Also, later perf-cgroups patches rely on it.
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: default avatarPaul Menage <menage@google.com>
      LKML-Reference: <1297160655.13327.92.camel@laptop>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      d41d5a01
    • Ingo Molnar's avatar
      Merge branch 'perf/urgent' into perf/core · b00560f2
      Ingo Molnar authored
      Merge reason: we need to queue up dependent patch
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      b00560f2
    • Peter Zijlstra's avatar
      perf: Fix throttle logic · 4fe757dd
      Peter Zijlstra authored
      It was possible to call pmu::start() on an already running event. In
      particular this lead so some wreckage as the hrtimer events would
      re-initialize active timers.
      
      This was due to throttled events being activated again by scheduling.
      Scheduling in a context would add and force start events, resulting in
      running events with a possible throttle status. The next tick to hit
      that task will then try to unthrottle the event and call ->start() on
      an already running event.
      Reported-by: default avatarJeff Moyer <jmoyer@redhat.com>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      4fe757dd
    • Cyrill Gorcunov's avatar
      perf, x86: P4 PMU: Fix spurious NMI messages · 7d44ec19
      Cyrill Gorcunov authored
      Several people have reported spurious unknown NMI
      messages on some P4 CPUs.
      
      This patch fixes it by checking for an overflow (negative
      counter values) directly, instead of relying on the
      P4_CCCR_OVF bit.
      Reported-by: default avatarGeorge Spelvin <linux@horizon.com>
      Reported-by: default avatarMeelis Roos <mroos@linux.ee>
      Reported-by: default avatarDon Zickus <dzickus@redhat.com>
      Reported-by: default avatarDave Airlie <airlied@gmail.com>
      Signed-off-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
      Cc: Lin Ming <ming.m.lin@intel.com>
      Cc: Don Zickus <dzickus@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <AANLkTinfuTfCck_FfaOHrDqQZZehtRzkBum4SpFoO=KJ@mail.gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      7d44ec19
    • Linus Torvalds's avatar
      Linux 2.6.38-rc5 · 85e2efbb
      Linus Torvalds authored
      85e2efbb
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu · 048f039f
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
        m68knommu: set flow handler for secondary interrupt controller of 5249
        m68knommu: remove use of IRQ_FLG_LOCK from 68360 platform support
        m68knommu: fix dereference of port.tty
        m68knommu: add missing linker __modver section
        m68knommu: fix mis-named variable int set_irq_chip loop
        m68knommu: add optimize memmove() function
        m68k: remove arch specific non-optimized memcmp()
        m68knommu: fix use of un-defined _TIF_WORK_MASK
        m68knommu: Rename m548x_wdt.c to m54xx_wdt.c
        m68knommu: fix m548x_wdt.c compilation after headers renaming
        m68knommu: Remove dependencies on nonexistent M68KNOMMU
      048f039f
  2. 15 Feb, 2011 31 commits
  3. 14 Feb, 2011 1 commit