1. 29 Jan, 2010 13 commits
  2. 28 Jan, 2010 1 commit
    • Anton Blanchard's avatar
      perf: Fix inconsistency between IP and callchain sampling · 339ce1a4
      Anton Blanchard authored
      When running perf across all cpus with backtracing (-a -g), sometimes we
      get samples without associated backtraces:
      
          23.44%         init  [kernel]                     [k] restore
          11.46%         init                       eeba0c  [k] 0x00000000eeba0c
           6.77%      swapper  [kernel]                     [k] .perf_ctx_adjust_freq
           5.73%         init  [kernel]                     [k] .__trace_hcall_entry
           4.69%         perf  libc-2.9.so                  [.] 0x0000000006bb8c
                             |
                             |--11.11%-- 0xfffa941bbbc
      
      It turns out the backtrace code has a check for the idle task and the IP
      sampling does not. This creates problems when profiling an interrupt
      heavy workload (in my case 10Gbit ethernet) since we get no backtraces
      for interrupts received while idle (ie most of the workload).
      
      Right now x86 and sh check that current is not NULL, which should never
      happen so remove that too.
      
      Idle task's exclusion must be performed from the core code, on top
      of perf_event_attr:exclude_idle.
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mundt <lethal@linux-sh.org>
      LKML-Reference: <20100118054707.GT12666@kryten>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      339ce1a4
  3. 27 Jan, 2010 6 commits
  4. 21 Jan, 2010 1 commit
    • Arnaldo Carvalho de Melo's avatar
      perf buildid-cache: Add new command to manage build-id cache · ef12a141
      Arnaldo Carvalho de Melo authored
      For now it just has operations to examine a given file, find its
      build-id and add or remove it to/from the cache.
      
      Useful, for instance, when adding binaries sent together with a
      perf.data file, so that we can add them to the cache and have
      the tools find it when resolving symbols.
      
      It'll also manage the size of the cache like 'ccache' does.
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1264008525-29025-1-git-send-email-acme@infradead.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      ef12a141
  5. 20 Jan, 2010 6 commits
  6. 18 Jan, 2010 1 commit
  7. 17 Jan, 2010 7 commits
    • Frederic Weisbecker's avatar
      perf: Better order flexible and pinned scheduling · 329c0e01
      Frederic Weisbecker authored
      When a task gets scheduled in. We don't touch the cpu bound events
      so the priority order becomes:
      
      	cpu pinned, cpu flexible, task pinned, task flexible.
      
      So schedule out cpu flexibles when a new task context gets in
      and correctly order the groups to schedule in:
      
      	task pinned, cpu flexible, task flexible.
      
      Cpu pinned groups don't need to be touched at this time.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
      329c0e01
    • Frederic Weisbecker's avatar
      perf: Don't schedule out/in pinned events on task tick · 7defb0f8
      Frederic Weisbecker authored
      We don't need to schedule in/out pinned events on task tick,
      now that pinned and flexible groups can be scheduled separately.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
      7defb0f8
    • Frederic Weisbecker's avatar
      perf: Allow pinned and flexible groups to be scheduled separately · 5b0311e1
      Frederic Weisbecker authored
      Tune the scheduling helpers so that we can choose to schedule either
      pinned and/or flexible groups from a context.
      
      And while at it, refactor a bit the naming of these helpers to make
      these more consistent and flexible.
      
      There is no (intended) change in scheduling behaviour in this
      patch.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
      5b0311e1
    • Frederic Weisbecker's avatar
      perf: Make __perf_event_sched_out static · 42cce92f
      Frederic Weisbecker authored
      __perf_event_sched_out doesn't need to be globally available, make
      it static.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
      42cce92f
    • Masami Hiramatsu's avatar
      tracing/kprobe: Update kprobe tracing self test for new syntax · 231e36f4
      Masami Hiramatsu authored
      Update kprobe tracing self test for new syntax (it supports
      deleting individual probes, and drops $argN support)
      and behavior change (new probes are disabled in default).
      
      This selftest includes the following checks:
      
       - Adding function-entry probe and return probe with arguments.
       - Enabling these probes.
       - Deleting it individually.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20100114051211.7814.29436.stgit@localhost6.localdomain6>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      231e36f4
    • Hitoshi Mitake's avatar
      perf probe: Fix build error of builtin-probe.c · 0eda7385
      Hitoshi Mitake authored
      I got this build error when building tip tree:
      
      | cc1: warnings being treated as errors
      | builtin-probe.c:123: error: 'opt_show_lines' defined but not used
      
      This error is caused by:
      
      | #ifndef NO_LIBDWARF
      |	OPT_CALLBACK('L', "line", NULL,
      |		     "FUNC[:RLN[+NUM|:RLN2]]|SRC:ALN[+NUM|:ALN2]",
      |		     "Show source code lines.", opt_show_lines),
      | #endif
      
      My environment defines NO_LIBDWARF, so gcc treated
      opt_show_lines() as garbage. So I moved opt_show_lines() into
      #ifndef NO_LIBDWARF ... #endif block.
      Signed-off-by: default avatarHitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Masami Hiramatsu <mhiramat@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      LKML-Reference: <1263645076-9993-1-git-send-email-mitake@dcl.info.waseda.ac.jp>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      0eda7385
    • Frederic Weisbecker's avatar
      perf: Fix implicit declaration of getline in util.c · 69e3f52d
      Frederic Weisbecker authored
      getline() is considered as undeclared in util/util.c because
      it includes string.h, that in turn includes stdio.h, without
      having defined _GNU_SOURCE.
      
      But util.c also includes util.h that handles the _GNU_SOURCE and
      all the needed inclusions already. Let's include only util.h
      and sys/mman.h which is the only one header not handled by
      util.h
      
      This fixes the following build error:
      
       util/util.c: In function 'slow_copyfile':
       util/util.c:49: erreur: implicit declaration of function
       'getline' util/util.c:49: erreur: nested extern declaration of 'getline'
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1263648075-3858-1-git-send-regression-fweisbec@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      69e3f52d
  8. 16 Jan, 2010 5 commits
    • Frederic Weisbecker's avatar
      perf: Export software-only event group characteristic as a flag · d6f962b5
      Frederic Weisbecker authored
      Before scheduling an event group, we first check if a group can go
      on. We first check if the group is made of software only events
      first, in which case it is enough to know if the group can be
      scheduled in.
      
      For that purpose, we iterate through the whole group, which is
      wasteful as we could do this check when we add/delete an event to
      a group.
      
      So we create a group_flags field in perf event that can host
      characteristics from a group of events, starting with a first
      PERF_GROUP_SOFTWARE flag that reduces the check on the fast path.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Acked-by: default avatarPeter Zijlstra <peterz@infradead.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
      d6f962b5
    • Frederic Weisbecker's avatar
      perf: Round robin flexible groups of events using list_rotate_left() · e2864173
      Frederic Weisbecker authored
      This is more proper that doing it through a list_for_each_entry()
      that breaks after the first entry.
      
      v2: Don't rotate pinned groups as its not needed to time share
      them.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Acked-by: default avatarPeter Zijlstra <peterz@infradead.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
      e2864173
    • Frederic Weisbecker's avatar
      list: Introduce list_rotate_left() · 5908cdc8
      Frederic Weisbecker authored
      Bring a new list_rotate_left() helper that rotates a list to
      the left. This is useful for codes that need to round roubin
      elements which queue priority increases from tail to head.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Acked-by: default avatarPeter Zijlstra <peterz@infradead.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
      5908cdc8
    • Frederic Weisbecker's avatar
      perf/core: Split context's event group list into pinned and non-pinned lists · 889ff015
      Frederic Weisbecker authored
      Split-up struct perf_event_context::group_list into pinned_groups
      and flexible_groups (non-pinned).
      
      This first appears to be useless as it duplicates various loops around
      the group list handlings.
      
      But it scales better in the fast-path in perf_sched_in(). We don't
      anymore iterate twice through the entire list to separate pinned and
      non-pinned scheduling. Instead we interate through two distinct lists.
      
      The another desired effect is that it makes easier to define distinct
      scheduling rules on both.
      
      Changes in v2:
      - Respectively rename pinned_grp_list and
        volatile_grp_list into pinned_groups and flexible_groups as per
        Ingo suggestion.
      - Various cleanups
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Acked-by: default avatarPeter Zijlstra <peterz@infradead.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
      889ff015
    • Arnaldo Carvalho de Melo's avatar
      perf symbols: Accept an alias when looking for "_text" · 881516eb
      Arnaldo Carvalho de Melo authored
      As it is in PARISC64:
      
      parisc:~# uname -a
      Linux parisc 2.6.33-rc4-tip+ #1 SMP Thu Jan 14 13:33:34 BRST
      2010 parisc64 GNU/Linux parisc:~# grep -w _text /proc/kallsyms
      0000000040100000 A _text
      parisc:~# grep 0000000040100000 /proc/kallsyms
      0000000040100000 T stext
      0000000040100000 T _stext
      0000000040100000 A _text
      parisc:~#
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1263586107-1756-2-git-send-email-acme@infradead.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      881516eb