lkml.org 
[lkml]   [2010]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Perf can't deal with many tracepoints
From
Date

"Theodore Ts'o" <tytso@mit.edu> writes:

> Perf will drop dead if it comes across tracepoints that have anything
> but primitive structure accessors in the TP_printk() section of the
> tracepoint definition. For example, the ext4 and jbd2 tracepoints uses
> jbd2_dev_to_name() to translate a dev_t to a string.

In the mean time, you may enjoy:

# stap -L 'kernel.trace("*")'
# stap -g -e '
%{
#include<linux/jbd2.h>
%}
function jbd2name(dev) %{
strlcpy(THIS->__retvalue, jbd2_dev_to_name(THIS->dev), MAXSTRINGLEN);
%}
probe kernel.trace("ext4_free_inode") {
log(jbd2name($inode->i_sb->s_dev))
}'


> The block I/O tracepoints uses MAJOR() and MINOR() to translate a
> dev_t to a major/minor number pair. [...]

(Similarly for this case.)


- FChE


\
 
 \ /
  Last update: 2010-10-28 19:45    [W:0.542 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site