lkml.org 
[lkml]   [2010]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2010-05-12 16:37    [W:0.094 / U:4.420 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site