[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100512143408.GP7426@linux.vnet.ibm.com>
Date: Wed, 12 May 2010 20:04:08 +0530
From: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
To: Frederic Weisbecker <fweisbec@...il.com>
Cc: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...e.hu>,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Masami Hiramatsu <mhiramat@...hat.com>,
Randy Dunlap <rdunlap@...otime.net>,
Ananth N Mavinakayanahalli <ananth@...ibm.com>,
Jim Keniston <jkenisto@...ux.vnet.ibm.com>,
"Frank Ch. Eigler" <fche@...hat.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 11/11] Uprobes traceevents patch.
> >
> > +config UPROBE_EVENT
> > + depends on UPROBES
> > + bool "Enable uprobes-based dynamic events"
> > + select TRACING
> > + default y
> > + help
> > + This allows the user to add tracing events (similar to tracepoints)
> > + on the fly via the traceevents interface.
>
>
>
> That doesn't explain much what it does. Please explain its goal of
> creating a trace event on top of a userspace dynamic probe.
>
Okay.
>
>
> > +#define MAX_TRACE_ARGS 128
> > +#define MAX_ARGSTR_LEN 63
> > +#define MAX_EVENT_NAME_LEN 64
>
>
> This can be shared with kprobes in a new kernel/trace/dyn_probes.h
> or something.
>
Okay.
> > + ret = register_uprobe_event(tp);
> > + if (ret) {
> > + pr_warning("Faild to register probe event(%d)\n", ret);
>
>
> "Failed"
Okay.
>
>
> > + group = UPROBE_EVENT_SYSTEM;
> > +
> > + if (is_delete) {
> > + if (!event) {
> > + pr_info("Delete command needs an event name.\n");
> > + return -EINVAL;
> > + }
> > + tp = find_probe_event(event, group);
> > + if (!tp) {
> > + pr_info("Event %s/%s doesn't exist.\n", group, event);
> > + return -ENOENT;
> > + }
> > + /* delete an event */
> > + unregister_trace_uprobe(tp);
>
>
>
> Doesn't seem to be under uprobe_lock.
Agree, the unregister_trace_uprobe() has to be called after locking
uprobe_lock.
>
>
>
> > +/* Make a debugfs interface for controling probe points */
> > +static __init int init_uprobe_trace(void)
> > +{
> > + struct dentry *d_tracer;
> > + struct dentry *entry;
> > +
> > + d_tracer = tracing_init_dentry();
> > + if (!d_tracer)
> > + return 0;
> > +
> > + entry = debugfs_create_file("uprobe_events", 0644, d_tracer,
> > + NULL, &uprobe_events_ops);
> > +
> > + /* Event list interface */
> > + if (!entry)
> > + pr_warning("Could not create debugfs "
> > + "'uprobe_events' entry\n");
>
>
>
> You can use trace_create_file I think.
Okay, will check that.
>
>
--
Thanks and Regards
Srikar
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists