aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-03-10 12:04:02 -0400
committerSteven Rostedt <srostedt@redhat.com>2009-03-10 12:04:02 -0400
commit2314c4ae1461c9e8b26cf8b9a851f280bc5769e1 (patch)
treec6f55179012c6997f77fa523f542efdfd1104c24
parent40e26815fafd3b8c4aced17b1f22e68ef33eb8db (diff)
tracing: add back the available_events file
The event directory files type and available_types were no longer needed with the new TRACE_EVENT_FORMAT macros, they were deleted. But by accident the available_events file was also removed. This patch brings it back. Reported-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Steven Rostedt <srostedt@redhat.com>
-rw-r--r--kernel/trace/trace_events.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index 85ec10fbb38d..769dfd00fc85 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -428,6 +428,13 @@ static const struct seq_operations show_set_event_seq_ops = {
428 .stop = t_stop, 428 .stop = t_stop,
429}; 429};
430 430
431static const struct file_operations ftrace_avail_fops = {
432 .open = ftrace_event_seq_open,
433 .read = seq_read,
434 .llseek = seq_lseek,
435 .release = seq_release,
436};
437
431static const struct file_operations ftrace_set_event_fops = { 438static const struct file_operations ftrace_set_event_fops = {
432 .open = ftrace_event_seq_open, 439 .open = ftrace_event_seq_open,
433 .read = seq_read, 440 .read = seq_read,
@@ -569,6 +576,13 @@ static __init int event_trace_init(void)
569 if (!d_tracer) 576 if (!d_tracer)
570 return 0; 577 return 0;
571 578
579 entry = debugfs_create_file("available_events", 0444, d_tracer,
580 (void *)&show_event_seq_ops,
581 &ftrace_avail_fops);
582 if (!entry)
583 pr_warning("Could not create debugfs "
584 "'available_events' entry\n");
585
572 entry = debugfs_create_file("set_event", 0644, d_tracer, 586 entry = debugfs_create_file("set_event", 0644, d_tracer,
573 (void *)&show_set_event_seq_ops, 587 (void *)&show_set_event_seq_ops,
574 &ftrace_set_event_fops); 588 &ftrace_set_event_fops);