Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 146157
b: refs/heads/master
c: 4671c79
h: refs/heads/master
i:
  146155: 7748c67
v: v3
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed May 8, 2009
1 parent ae676e6 commit d6559ff
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 29f93943d1916d1a3faa3f10f4a06994347ac990
refs/heads/master: 4671c79408a3f8a5a6a45e39c4c164dada3a5678
2 changes: 2 additions & 0 deletions trunk/include/linux/ftrace_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ extern int trace_define_field(struct ftrace_event_call *call, char *type,

#define is_signed_type(type) (((type)(-1)) < 0)

int trace_set_clr_event(const char *system, const char *event, int set);

/*
* The double __builtin_constant_p is because gcc will give us an error
* if we try to allocate the static variable to fmt if it is not a
Expand Down
17 changes: 17 additions & 0 deletions trunk/kernel/trace/trace_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,23 @@ static int ftrace_set_clr_event(char *buf, int set)
return __ftrace_set_clr_event(match, sub, event, set);
}

/**
* trace_set_clr_event - enable or disable an event
* @system: system name to match (NULL for any system)
* @event: event name to match (NULL for all events, within system)
* @set: 1 to enable, 0 to disable
*
* This is a way for other parts of the kernel to enable or disable
* event recording.
*
* Returns 0 on success, -EINVAL if the parameters do not match any
* registered events.
*/
int trace_set_clr_event(const char *system, const char *event, int set)
{
return __ftrace_set_clr_event(NULL, system, event, set);
}

/* 128 should be much more than enough */
#define EVENT_BUF_SIZE 127

Expand Down

0 comments on commit d6559ff

Please sign in to comment.