1. 01 Dec, 2010 1 commit
  2. 30 Nov, 2010 11 commits
  3. 27 Nov, 2010 3 commits
  4. 26 Nov, 2010 18 commits
  5. 23 Nov, 2010 1 commit
    • Rabin Vincent's avatar
      perf symbols: Remove incorrect open-coded container_of() · 02a9d037
      Rabin Vincent authored
      At least on ARM, padding is inserted between rb_node and sym in struct
      symbol_name_rb_node, causing "((void *)sym) - sizeof(struct rb_node)" to
      point inside rb_node rather than to the symbol_name_rb_node.  Fix this
      by converting the code to use container_of().
      
      Cc: Ian Munsie <imunsie@au1.ibm.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Ming Lei <tom.leiming@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <20101123163106.GA25677@debian>
      Signed-off-by: default avatarRabin Vincent <rabin@rab.in>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      02a9d037
  6. 22 Nov, 2010 1 commit
    • Arnaldo Carvalho de Melo's avatar
      perf record: Handle restrictive permissions in /proc/{kallsyms,modules} · c1a3a4b9
      Arnaldo Carvalho de Melo authored
      The 59365d13 commit, even being reverted by 33e0d57f, showed a non robust
      behavior in 'perf record': it really should just warn the user that some
      functionality will not be available.
      
      The new behavior then becomes:
      
      	[acme@felicio linux]$ ls -la /proc/{kallsyms,modules}
      	-r-------- 1 root root 0 Nov 22 12:19 /proc/kallsyms
      	-r-------- 1 root root 0 Nov 22 12:19 /proc/modules
      	[acme@felicio linux]$ perf record ls -R > /dev/null
      	Couldn't record kernel reference relocation symbol
      	Symbol resolution may be skewed if relocation was used (e.g. kexec).
      	Check /proc/kallsyms permission or run as root.
      	[ perf record: Woken up 1 times to write data ]
      	[ perf record: Captured and wrote 0.004 MB perf.data (~161 samples) ]
      	[acme@felicio linux]$ perf report --stdio
      	[kernel.kallsyms] with build id 77b05e00e64e4de1c9347d83879779b540d69f00 not found, continuing without symbols
      	# Events: 98  cycles
      	#
      	# Overhead  Command    Shared Object                Symbol
      	# ........  .......  ...............  ....................
      	#
      	    48.26%       ls  [kernel]         [k] ffffffff8102b92b
      	    22.49%       ls  libc-2.12.90.so  [.] __strlen_sse2
      	     8.35%       ls  libc-2.12.90.so  [.] __GI___strcoll_l
      	     8.17%       ls  ls               [.]            11580
      	     3.35%       ls  libc-2.12.90.so  [.] _IO_new_file_xsputn
      	     3.33%       ls  libc-2.12.90.so  [.] _int_malloc
      	     1.88%       ls  libc-2.12.90.so  [.] _int_free
      	     0.84%       ls  libc-2.12.90.so  [.] malloc_consolidate
      	     0.84%       ls  libc-2.12.90.so  [.] __readdir64
      	     0.83%       ls  ls               [.] strlen@plt
      	     0.83%       ls  libc-2.12.90.so  [.] __GI_fwrite_unlocked
      	     0.83%       ls  libc-2.12.90.so  [.] __memcpy_sse2
      
      	#
      	# (For a higher level overview, try: perf report --sort comm,dso)
      	#
      [acme@felicio linux]$
      
      It still has the build-ids for DSOs in the maps with hits:
      
      [acme@felicio linux]$ perf buildid-list
      77b05e00e64e4de1c9347d83879779b540d69f00 [kernel.kallsyms]
      09c4a431a4a8b648fcfc2c2bdda70f56050ddff1 /bin/ls
      af75ea9ad951d25e0f038901a11b3846dccb29a4 /lib64/libc-2.12.90.so
      [acme@felicio linux]$
      
      That can be used in another machine to resolve kernel symbols.
      
      Cc: Eugene Teo <eugeneteo@kernel.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Jesper Juhl <jj@chaosbits.net>
      Cc: Marcus Meissner <meissner@suse.de>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      c1a3a4b9
  7. 21 Nov, 2010 1 commit
  8. 20 Nov, 2010 4 commits
    • Corey Ashford's avatar
      perf stat: Change and clean up sys_perf_event_open error handling · d9cf837e
      Corey Ashford authored
      This patch makes several changes to "perf stat":
      
      - "perf stat" will no longer go ahead and run the application when one or
      more of the specified events could not be opened.
      - Use error() and die() instead of pr_err() so that the output is more
      consistent with "perf top" and "perf record".
      - Handle permission errors in a more robust way, and in a similar way to
      "perf record" and "perf top".
      
      In addition, the sys_perf_event_open() error handling of "perf top" and "perf
      record" is made more consistent and adds the following phrase when an event
      doesn't open (with something ther than an access or permission error):
      
      "/bin/dmesg may provide additional information."
      
      This is added because kernel code doesn't have a good way of expressing
      detailed errors to user space, so its only avenue is to use printk's.  However,
      many users may not think of looking at dmesg to find out why an event is being
      rejected.
      
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <fweisbec@gmail.com>
      Cc: Ian Munsie <ianmunsi@au1.ibm.com>
      Cc: Michael Ellerman <michaele@au1.ibm.com>
      LKML-Reference: <1290217044-26293-1-git-send-email-cjashfor@linux.vnet.ibm.com>
      Signed-off-by: default avatarCorey Ashford <cjashfor@linux.vnet.ibm.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d9cf837e
    • Linus Torvalds's avatar
      Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · b86db474
      Linus Torvalds authored
      * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        ext4: Add EXT4_IOC_TRIM ioctl to handle batched discard
        fs: Do not dispatch FITRIM through separate super_operation
        ext4: ext4_fill_super shouldn't return 0 on corruption
        jbd2: fix /proc/fs/jbd2/<dev> when using an external journal
        ext4: missing unlock in ext4_clear_request_list()
        ext4: fix setting random pages PageUptodate
      b86db474
    • Lukas Czerner's avatar
      ext4: Add EXT4_IOC_TRIM ioctl to handle batched discard · e681c047
      Lukas Czerner authored
      Filesystem independent ioctl was rejected as not common enough to be in
      core vfs ioctl. Since we still need to access to this functionality this
      commit adds ext4 specific ioctl EXT4_IOC_TRIM to dispatch
      ext4_trim_fs().
      
      It takes fstrim_range structure as an argument. fstrim_range is definec in
      the include/linux/fs.h and its definition is as follows.
      
      struct fstrim_range {
      	__u64 start;
      	__u64 len;
      	__u64 minlen;
      }
      
      start	- first Byte to trim
      len	- number of Bytes to trim from start
      minlen	- minimum extent length to trim, free extents shorter than this
        number of Bytes will be ignored. This will be rounded up to fs
        block size.
      
      After the FITRIM is done, the number of actually discarded Bytes is stored
      in fstrim_range.len to give the user better insight on how much storage
      space has been really released for wear-leveling.
      Signed-off-by: default avatarLukas Czerner <lczerner@redhat.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      e681c047
    • Lukas Czerner's avatar
      fs: Do not dispatch FITRIM through separate super_operation · 93bb41f4
      Lukas Czerner authored
      There was concern that FITRIM ioctl is not common enough to be included
      in core vfs ioctl, as Christoph Hellwig pointed out there's no real point
      in dispatching this out to a separate vector instead of just through
      ->ioctl.
      
      So this commit removes ioctl_fstrim() from vfs ioctl and trim_fs
      from super_operation structure.
      Signed-off-by: default avatarLukas Czerner <lczerner@redhat.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      93bb41f4