Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350101
b: refs/heads/master
c: b64b007
h: refs/heads/master
i:
  350099: bd95ac6
v: v3
  • Loading branch information
Oleg Nesterov committed Feb 8, 2013
1 parent f3ab9c4 commit b9e5045
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 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: 7e4e28c53963e6cfa94d8109bb8f5233c5659048
refs/heads/master: b64b007797c1e6d6b745c93c296ba1d5f4d72d86
1 change: 0 additions & 1 deletion trunk/kernel/trace/trace_probe.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
#define TP_FLAG_TRACE 1
#define TP_FLAG_PROFILE 2
#define TP_FLAG_REGISTERED 4
#define TP_FLAG_UPROBE 8


/* data_rloc: data relative location, compatible with u32 */
Expand Down
9 changes: 7 additions & 2 deletions trunk/kernel/trace/trace_uprobe.c
Original file line number Diff line number Diff line change
Expand Up @@ -539,12 +539,17 @@ print_uprobe_event(struct trace_iterator *iter, int flags, struct trace_event *e
return TRACE_TYPE_PARTIAL_LINE;
}

static inline bool is_trace_uprobe_enabled(struct trace_uprobe *tu)
{
return tu->flags & (TP_FLAG_TRACE | TP_FLAG_PROFILE);
}

static int probe_event_enable(struct trace_uprobe *tu, int flag)
{
struct uprobe_trace_consumer *utc;
int ret = 0;

if (tu->consumer)
if (is_trace_uprobe_enabled(tu))
return -EINTR;

utc = kzalloc(sizeof(struct uprobe_trace_consumer), GFP_KERNEL);
Expand All @@ -568,7 +573,7 @@ static int probe_event_enable(struct trace_uprobe *tu, int flag)

static void probe_event_disable(struct trace_uprobe *tu, int flag)
{
if (!tu->consumer)
if (!is_trace_uprobe_enabled(tu))
return;

uprobe_unregister(tu->inode, tu->offset, &tu->consumer->cons);
Expand Down

0 comments on commit b9e5045

Please sign in to comment.