Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 156454
b: refs/heads/master
c: af6af30
h: refs/heads/master
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Aug 6, 2009
1 parent 286eccb commit c9cfad5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 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: 386c0b702b1ea81c0f54f5c9832a3d4a52270f14
refs/heads/master: af6af30c0fcd77e621638e53ef8b176bca8bd3b4
8 changes: 3 additions & 5 deletions trunk/include/linux/ftrace_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,9 @@ struct ftrace_event_call {
void *filter;
void *mod;

#ifdef CONFIG_EVENT_PROFILE
atomic_t profile_count;
int (*profile_enable)(struct ftrace_event_call *);
void (*profile_disable)(struct ftrace_event_call *);
#endif
atomic_t profile_count;
int (*profile_enable)(struct ftrace_event_call *);
void (*profile_disable)(struct ftrace_event_call *);
};

#define MAX_FILTER_PRED 32
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/trace/trace_event_profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ int ftrace_profile_enable(int event_id)

mutex_lock(&event_mutex);
list_for_each_entry(event, &ftrace_events, list) {
if (event->id == event_id) {
if (event->id == event_id && event->profile_enable) {
ret = event->profile_enable(event);
break;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/trace/trace_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,7 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events,
entry = trace_create_file("enable", 0644, call->dir, call,
enable);

if (call->id)
if (call->id && call->profile_enable)
entry = trace_create_file("id", 0444, call->dir, call,
id);

Expand Down

0 comments on commit c9cfad5

Please sign in to comment.