Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 366052
b: refs/heads/master
c: 4ee5a52
h: refs/heads/master
v: v3
  • Loading branch information
Oleg Nesterov committed Apr 13, 2013
1 parent 047e837 commit caeaac6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3ede82dd3e3deb23429f2bf44fb600f440eef84b
refs/heads/master: 4ee5a52ed6301d0afa56cc995ef2c3795f45e801
11 changes: 7 additions & 4 deletions trunk/kernel/trace/trace_uprobe.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ static int register_trace_uprobe(struct trace_uprobe *tu)

/*
* Argument syntax:
* - Add uprobe: p[:[GRP/]EVENT] PATH:SYMBOL[+offs] [FETCHARGS]
* - Add uprobe: p|r[:[GRP/]EVENT] PATH:SYMBOL [FETCHARGS]
*
* - Remove uprobe: -:[GRP/]EVENT
*/
Expand All @@ -213,20 +213,23 @@ static int create_trace_uprobe(int argc, char **argv)
char buf[MAX_EVENT_NAME_LEN];
struct path path;
unsigned long offset;
bool is_delete;
bool is_delete, is_return;
int i, ret;

inode = NULL;
ret = 0;
is_delete = false;
is_return = false;
event = NULL;
group = NULL;

/* argc must be >= 1 */
if (argv[0][0] == '-')
is_delete = true;
else if (argv[0][0] == 'r')
is_return = true;
else if (argv[0][0] != 'p') {
pr_info("Probe definition must be started with 'p' or '-'.\n");
pr_info("Probe definition must be started with 'p', 'r' or '-'.\n");
return -EINVAL;
}

Expand Down Expand Up @@ -324,7 +327,7 @@ static int create_trace_uprobe(int argc, char **argv)
kfree(tail);
}

tu = alloc_trace_uprobe(group, event, argc, false);
tu = alloc_trace_uprobe(group, event, argc, is_return);
if (IS_ERR(tu)) {
pr_info("Failed to allocate trace_uprobe.(%d)\n", (int)PTR_ERR(tu));
ret = PTR_ERR(tu);
Expand Down

0 comments on commit caeaac6

Please sign in to comment.