Re: Perf can't deal with many tracepoints
From: Frank Ch. Eigler
Date: Thu Oct 28 2010 - 13:42:45 EST
"Theodore Ts'o" <tytso@xxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/