1. 18 Mar, 2013 5 commits
    • Masami Hiramatsu's avatar
      kprobes: Make hash_64() as always inlined · 65c10553
      Masami Hiramatsu authored
      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: default avatarTimo Juhani Lindfors <timo.lindfors@iki.fi>
      Signed-off-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Acked-by: default avatarAnanth 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: default avatarIngo Molnar <mingo@kernel.org>
      65c10553
    • Ingo Molnar's avatar
      Merge tag 'perf-urgent-for-mingo' of... · a0bf225d
      Ingo Molnar authored
      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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      a0bf225d
    • Ingo Molnar's avatar
      Merge branch 'tip/perf/urgent-2' of... · 1f1b3967
      Ingo Molnar authored
      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: default avatarIngo Molnar <mingo@kernel.org>
      1f1b3967
    • Namhyung Kim's avatar
      perf: Generate EXIT event only once per task context · d610d98b
      Namhyung Kim authored
      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: default avatarNamhyung 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: default avatarIngo Molnar <mingo@kernel.org>
      d610d98b
    • Namhyung Kim's avatar
      perf: Reset hwc->last_period on sw clock events · 778141e3
      Namhyung Kim authored
      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: default avatarNamhyung 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: default avatarIngo Molnar <mingo@kernel.org>
      778141e3
  2. 15 Mar, 2013 2 commits
  3. 14 Mar, 2013 3 commits
  4. 13 Mar, 2013 30 commits