1. 18 3月, 2013 5 次提交
    • M
      kprobes: Make hash_64() as always inlined · 65c10553
      Masami Hiramatsu 提交于
      Because hash_64() is called from the get_kprobe() inside
      int3 handler, kernel causes int3 recursion and crashes if
      kprobes user puts a probe on it.
      
      Usually hash_64() is inlined into caller function, but in
      some cases, it has instances by gcc's interprocedural
      constant propagation.
      
      This patch uses __always_inline instead of inline to
      prevent gcc from doing such things.
      Reported-by: NTimo Juhani Lindfors <timo.lindfors@iki.fi>
      Signed-off-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Acked-by: NAnanth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Pavel Emelyanov <xemul@parallels.com>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Cc: Nadia Yvette Chambers <nyc@holomorphy.com>
      Cc: yrl.pp-manager.tt@hitachi.com
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Link: http://lkml.kernel.org/r/20130314115230.19690.39387.stgit@mhiramat-M0-7522Signed-off-by: NIngo Molnar <mingo@kernel.org>
      65c10553
    • I
      Merge tag 'perf-urgent-for-mingo' of... · a0bf225d
      Ingo Molnar 提交于
      Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
      
      Pull perf/urgent fixes from Arnaldo Carvalho de Melo:
      
      . perf probe: Fix segfault due to testing the wrong pointer for NULL,
        from Ananth N Mavinakayanahalli.
      
      . libtraceevent: Remove hard coded include to /usr/local/include in
        Makefile, which causes cross builds to include host header files,
        fix from Jack Mitchell.
      
      . perf record: Use the right target interface for synthesizing
        threads when --cpu/-C option is used, fix from Jiri Olsa.
      
      . Check if -DFORTIFY_SOURCE=2 is allowed, as gcc 4.7.2 defines
        it and then the build is broken when it is redefined in perf,
        fix from Marcin Slusarz.
      
      . Fix build with NO_NEWT=1, that can happen explicitely or when
        the newt-devel package is not installed, from Michael Ellerman.
      
      . perf/POWER7: Create a sysfs format entry for Power7 events, missing
        patch from a patchseries already merged, from Sukadev Bhattiprolu.
      
      . Fix LIBNUMA build with glibc 2.12 and older, from Vinson Lee.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      a0bf225d
    • I
      Merge branch 'tip/perf/urgent-2' of... · 1f1b3967
      Ingo Molnar 提交于
      Merge branch 'tip/perf/urgent-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace into perf/urgent
      
      Pull tracing fixes from Steven Rostedt.
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      1f1b3967
    • N
      perf: Generate EXIT event only once per task context · d610d98b
      Namhyung Kim 提交于
      perf_event_task_event() iterates pmu list and generate events
      for each eligible pmu context.  But if task_event has task_ctx
      like in EXIT it'll generate events even though the pmu doesn't
      have an eligible one. Fix it by moving the code to proper
      places.
      
      Before this patch:
      
        $ perf record -n true
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.006 MB perf.data (~248 samples) ]
      
        $ perf report -D | tail
        Aggregated stats:
                   TOTAL events:         73
                    MMAP events:         67
                    COMM events:          2
                    EXIT events:          4
        cycles stats:
                   TOTAL events:         73
                    MMAP events:         67
                    COMM events:          2
                    EXIT events:          4
      
      After this patch:
      
        $ perf report -D | tail
        Aggregated stats:
                   TOTAL events:         70
                    MMAP events:         67
                    COMM events:          2
                    EXIT events:          1
        cycles stats:
                   TOTAL events:         70
                    MMAP events:         67
                    COMM events:          2
                    EXIT events:          1
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung.kim@lge.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1363332433-7637-1-git-send-email-namhyung@kernel.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      d610d98b
    • N
      perf: Reset hwc->last_period on sw clock events · 778141e3
      Namhyung Kim 提交于
      When cpu/task clock events are initialized, their sampling
      frequencies are converted to have a fixed value.  However it
      missed to update the hwc->last_period which was set to 1 for
      initial sampling frequency calibration.
      
      Because this hwc->last_period value is used as a period in
      perf_swevent_ hrtime(), every recorded sample will have an
      incorrected period of 1.
      
        $ perf record -e task-clock noploop 1
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.158 MB perf.data (~6919 samples) ]
      
        $ perf report -n --show-total-period  --stdio
        # Samples: 4K of event 'task-clock'
        # Event count (approx.): 4000
        #
        # Overhead       Samples        Period  Command  Shared Object              Symbol
        # ........  ............  ............  .......  .............  ..................
        #
            99.95%          3998          3998  noploop  noploop        [.] main
             0.03%             1             1  noploop  libc-2.15.so   [.] init_cacheinfo
             0.03%             1             1  noploop  ld-2.15.so     [.] open_verify
      
      Note that it doesn't affect the non-sampling event so that the
      perf stat still gets correct value with or without this patch.
      
        $ perf stat -e task-clock noploop 1
      
         Performance counter stats for 'noploop 1':
      
               1000.272525 task-clock                #    1.000 CPUs utilized
      
               1.000560605 seconds time elapsed
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung.kim@lge.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1363574507-18808-1-git-send-email-namhyung@kernel.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      778141e3
  2. 15 3月, 2013 3 次提交
  3. 14 3月, 2013 32 次提交