1. 23 Mar, 2011 5 commits
    • Arnaldo Carvalho de Melo's avatar
      perf session: Pass evsel in event_ops->sample() · 9e69c210
      Arnaldo Carvalho de Melo authored
      Resolving the sample->id to an evsel since the most advanced tools,
      report and annotate, and the others will too when they evolve to
      properly support multi-event perf.data files.
      
      Good also because it does an extra validation, checking that the ID is
      valid when present. When that is not the case, the overhead is just a
      branch + function call (perf_evlist__id2evsel).
      
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      9e69c210
    • Frederic Weisbecker's avatar
      perf: Better fit max unprivileged mlock pages for tools needs · 880f5731
      Frederic Weisbecker authored
      The maximum kilobytes of locked memory that an unprivileged user
      can reserve is of 512 kB = 128 pages by default, scaled to the
      number of onlined CPUs, which fits well with the tools that use
      128 data pages by default.
      
      However tools actually use 129 pages, because they need one more
      for the user control page. Thus the default mlock threshold is
      not sufficient for the default tools needs and we always end up
      to evaluate the constant mlock rlimit policy, which doesn't have
      this scaling with the number of online CPUs.
      
      Hence, on systems that have more than 16 CPUs, we overlap the
      rlimit threshold and fail to mmap:
      
      	$ perf record ls
      	Error: failed to mmap with 1 (Operation not permitted)
      
      Just increase the max unprivileged mlock threshold by one page
      so that it supports well perf tools even after 16 CPUs.
      Reported-by: default avatarHan Pingtian <phan@redhat.com>
      Reported-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Reported-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Acked-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Stable <stable@kernel.org>
      LKML-Reference: <1300904979-5508-1-git-send-email-fweisbec@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      880f5731
    • Stephane Eranian's avatar
      perf_events: Fix stale ->cgrp pointer in update_cgrp_time_from_cpuctx() · 68cacd29
      Stephane Eranian authored
      This patch solves a stale pointer problem in
      update_cgrp_time_from_cpuctx(). The cpuctx->cgrp
      was not cleared on all possible event exit paths,
      including:
      
         close()
           perf_release()
             perf_release_kernel()
               list_del_event()
      
      This patch fixes list_del_event() to clear cpuctx->cgrp
      when there are no cgroup events left in the context.
      
      [ This second version makes the code compile when
        CONFIG_CGROUP_PERF is not enabled. We unconditionally define
        perf_cpu_context->cgrp. ]
      Signed-off-by: default avatarStephane Eranian <eranian@google.com>
      Cc: peterz@infradead.org
      Cc: perfmon2-devel@lists.sf.net
      Cc: paulus@samba.org
      Cc: davem@davemloft.net
      LKML-Reference: <20110323150306.GA1580@quad>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      68cacd29
    • Akihiro Nagai's avatar
      perf top: Fix uninitialized 'counter' variable · ce2d17ca
      Akihiro Nagai authored
      builtin-top.c has an uninitialized variable.
      gcc(version 4.5.1) warns about it and it results in build failure:
      
       builtin-top.c: In function 'display_thread':
       builtin-top.c:518:9: error: 'counter' may be used uninitialized
      
      This situation can indeed trigger, if the getline() call in
      prompt_integer() fails.
      Signed-off-by: default avatarAkihiro Nagai <akihiro.nagai.hw@hitachi.com>
      Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      LKML-Reference: <20110323072939.11638.50173.stgit@localhost6.localdomain6>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      ce2d17ca
    • Ingo Molnar's avatar
      Merge branch 'tip/perf/urgent' of... · e1eb0290
      Ingo Molnar authored
      Merge branch 'tip/perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/urgent
      e1eb0290
  2. 22 Mar, 2011 1 commit
    • Jiri Olsa's avatar
      tracing: Fix set_ftrace_filter probe function display · 1106b699
      Jiri Olsa authored
      If one or more function probes (like traceon) are enabled,
      and there's no other function filter, the first probe
      func is skipped (which one depends on the position in the hash).
      
      $ echo sys_open:traceon sys_close:traceon > ./set_ftrace_filter
      $ cat set_ftrace_filter
      #### all functions enabled ####
      sys_close:traceon:unlimited
      $
      
      The reason was, that in the case of no other function filter,
      the func_pos was not properly updated before calling t_hash_start.
      Signed-off-by: default avatarJiri Olsa <jolsa@redhat.com>
      LKML-Reference: <1297874134-7008-1-git-send-email-jolsa@redhat.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      1106b699
  3. 19 Mar, 2011 1 commit
    • Stephane Eranian's avatar
      perf, x86: Fix Intel fixed counters base initialization · fc66c521
      Stephane Eranian authored
      The following patch solves the problems introduced by Robert's
      commit 41bf4989 and reported by Arun Sharma. This commit gets rid
      of the base + index notation for reading and writing PMU msrs.
      
      The problem is that for fixed counters, the new calculation for
      the base did not take into account the fixed counter indexes,
      thus all fixed counters were read/written from fixed counter 0.
      Although all fixed counters share the same config MSR, they each
      have their own counter register.
      
      Without:
      
       $ task -e unhalted_core_cycles -e instructions_retired -e baclears noploop 1 noploop for 1 seconds
      
        242202299 unhalted_core_cycles (0.00% scaling, ena=1000790892, run=1000790892)
       2389685946 instructions_retired (0.00% scaling, ena=1000790892, run=1000790892)
            49473 baclears             (0.00% scaling, ena=1000790892, run=1000790892)
      
      With:
      
       $ task -e unhalted_core_cycles -e instructions_retired -e baclears noploop 1 noploop for 1 seconds
      
       2392703238 unhalted_core_cycles (0.00% scaling, ena=1000840809, run=1000840809)
       2389793744 instructions_retired (0.00% scaling, ena=1000840809, run=1000840809)
            47863 baclears             (0.00% scaling, ena=1000840809, run=1000840809)
      Signed-off-by: default avatarStephane Eranian <eranian@google.com>
      Cc: peterz@infradead.org
      Cc: ming.m.lin@intel.com
      Cc: robert.richter@amd.com
      Cc: asharma@fb.com
      Cc: perfmon2-devel@lists.sf.net
      LKML-Reference: <20110319172005.GB4978@quad>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      fc66c521
  4. 18 Mar, 2011 1 commit
  5. 17 Mar, 2011 3 commits
  6. 16 Mar, 2011 28 commits
  7. 15 Mar, 2011 1 commit
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 · 422e6c4b
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (57 commits)
        tidy the trailing symlinks traversal up
        Turn resolution of trailing symlinks iterative everywhere
        simplify link_path_walk() tail
        Make trailing symlink resolution in path_lookupat() iterative
        update nd->inode in __do_follow_link() instead of after do_follow_link()
        pull handling of one pathname component into a helper
        fs: allow AT_EMPTY_PATH in linkat(), limit that to CAP_DAC_READ_SEARCH
        Allow passing O_PATH descriptors via SCM_RIGHTS datagrams
        readlinkat(), fchownat() and fstatat() with empty relative pathnames
        Allow O_PATH for symlinks
        New kind of open files - "location only".
        ext4: Copy fs UUID to superblock
        ext3: Copy fs UUID to superblock.
        vfs: Export file system uuid via /proc/<pid>/mountinfo
        unistd.h: Add new syscalls numbers to asm-generic
        x86: Add new syscalls for x86_64
        x86: Add new syscalls for x86_32
        fs: Remove i_nlink check from file system link callback
        fs: Don't allow to create hardlink for deleted file
        vfs: Add open by file handle support
        ...
      422e6c4b