This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH -tip -v11 11/11] tracing: Add kprobes event profiling interface
- From: Li Zefan <lizf at cn dot fujitsu dot com>
- To: Masami Hiramatsu <mhiramat at redhat dot com>
- Cc: Ingo Molnar <mingo at elte dot hu>, Steven Rostedt <rostedt at goodmis dot org>, lkml <linux-kernel at vger dot kernel dot org>, systemtap <systemtap at sources dot redhat dot com>, kvm <kvm at vger dot kernel dot org>, DLE <dle-develop at lists dot sourceforge dot net>, Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>, Christoph Hellwig <hch at infradead dot org>, Frederic Weisbecker <fweisbec at gmail dot com>, Tom Zanussi <tzanussi at gmail dot com>
- Date: Fri, 10 Jul 2009 14:46:48 +0800
- Subject: Re: [PATCH -tip -v11 11/11] tracing: Add kprobes event profiling interface
- References: <20090709202220.13223.97114.stgit@localhost.localdomain> <20090709202327.13223.16418.stgit@localhost.localdomain>
> +Event Profiling
> +---------------
> + You can check the total number of probe hits and probe miss-hits via
> +/sys/kernel/debug/tracing/kprobe_profile.
> + The fist column is event name, the second is the number of probe hits,
s/fist/first
> +the third is the number of probe miss-hits.
> +
> +
...
> +/* Probes profiling interfaces */
> +static int profile_seq_show(struct seq_file *m, void *v)
> +{
> + struct trace_probe *tp = v;
> +
> + if (tp == NULL)
> + return 0;
> +
tp will never be NULL, which is guaranteed by seq_file
> + seq_printf(m, "%s", tp->call.name);
> +
> + seq_printf(m, "\t%8lu %8lu\n", tp->nhits,
> + probe_is_return(tp) ? tp->rp.kp.nmissed : tp->kp.nmissed);
> +
> + return 0;
> +}