mm: memmap defer init doesn't work as expected
[linux-2.6-microblaze.git] / kernel / trace / trace_uprobe.c
index f4286c9..3cf7128 100644 (file)
@@ -528,7 +528,7 @@ end:
 
 /*
  * Argument syntax:
- *  - Add uprobe: p|r[:[GRP/]EVENT] PATH:OFFSET [FETCHARGS]
+ *  - Add uprobe: p|r[:[GRP/]EVENT] PATH:OFFSET[%return][(REF)] [FETCHARGS]
  */
 static int trace_uprobe_create(int argc, const char **argv)
 {
@@ -617,6 +617,19 @@ static int trace_uprobe_create(int argc, const char **argv)
                }
        }
 
+       /* Check if there is %return suffix */
+       tmp = strchr(arg, '%');
+       if (tmp) {
+               if (!strcmp(tmp, "%return")) {
+                       *tmp = '\0';
+                       is_return = true;
+               } else {
+                       trace_probe_log_err(tmp - filename, BAD_ADDR_SUFFIX);
+                       ret = -EINVAL;
+                       goto fail_address_parse;
+               }
+       }
+
        /* Parse uprobe offset. */
        ret = kstrtoul(arg, 0, &offset);
        if (ret) {
@@ -1625,21 +1638,20 @@ void destroy_local_trace_uprobe(struct trace_event_call *event_call)
 /* Make a trace interface for controling probe points */
 static __init int init_uprobe_trace(void)
 {
-       struct dentry *d_tracer;
        int ret;
 
        ret = dyn_event_register(&trace_uprobe_ops);
        if (ret)
                return ret;
 
-       d_tracer = tracing_init_dentry();
-       if (IS_ERR(d_tracer))
+       ret = tracing_init_dentry();
+       if (ret)
                return 0;
 
-       trace_create_file("uprobe_events", 0644, d_tracer,
+       trace_create_file("uprobe_events", 0644, NULL,
                                    NULL, &uprobe_events_ops);
        /* Profile interface */
-       trace_create_file("uprobe_profile", 0444, d_tracer,
+       trace_create_file("uprobe_profile", 0444, NULL,
                                    NULL, &uprobe_profile_ops);
        return 0;
 }