aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_events.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-10-23 02:23:20 -0400
committerIngo Molnar <mingo@elte.hu>2009-10-23 02:23:20 -0400
commit43315956509ca6913764861ac7dec128b91eb1ec (patch)
tree60fd5647f150a46e63093a41417c2eef3e776b3d /kernel/trace/trace_events.c
parent9bf4e7fba8006d19846fec877b6da0616b2772de (diff)
parent6beba7adbe092e63dfe8d09fbd1e3ec140474a13 (diff)
Merge branch 'perf/core' into perf/probes
Conflicts: tools/perf/Makefile Merge reason: - fix the conflict - pick up the pr_*() infrastructure to queue up dependent patch Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace_events.c')
-rw-r--r--kernel/trace/trace_events.c47
1 files changed, 23 insertions, 24 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index f2f5064701e5..1d18315dc836 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -503,7 +503,7 @@ extern char *__bad_type_size(void);
503#define FIELD(type, name) \ 503#define FIELD(type, name) \
504 sizeof(type) != sizeof(field.name) ? __bad_type_size() : \ 504 sizeof(type) != sizeof(field.name) ? __bad_type_size() : \
505 #type, "common_" #name, offsetof(typeof(field), name), \ 505 #type, "common_" #name, offsetof(typeof(field), name), \
506 sizeof(field.name) 506 sizeof(field.name), is_signed_type(type)
507 507
508static int trace_write_header(struct trace_seq *s) 508static int trace_write_header(struct trace_seq *s)
509{ 509{
@@ -511,17 +511,17 @@ static int trace_write_header(struct trace_seq *s)
511 511
512 /* struct trace_entry */ 512 /* struct trace_entry */
513 return trace_seq_printf(s, 513 return trace_seq_printf(s,
514 "\tfield:%s %s;\toffset:%zu;\tsize:%zu;\n" 514 "\tfield:%s %s;\toffset:%zu;\tsize:%zu;\tsigned:%u;\n"
515 "\tfield:%s %s;\toffset:%zu;\tsize:%zu;\n" 515 "\tfield:%s %s;\toffset:%zu;\tsize:%zu;\tsigned:%u;\n"
516 "\tfield:%s %s;\toffset:%zu;\tsize:%zu;\n" 516 "\tfield:%s %s;\toffset:%zu;\tsize:%zu;\tsigned:%u;\n"
517 "\tfield:%s %s;\toffset:%zu;\tsize:%zu;\n" 517 "\tfield:%s %s;\toffset:%zu;\tsize:%zu;\tsigned:%u;\n"
518 "\tfield:%s %s;\toffset:%zu;\tsize:%zu;\n" 518 "\tfield:%s %s;\toffset:%zu;\tsize:%zu;\tsigned:%u;\n"
519 "\n", 519 "\n",
520 FIELD(unsigned short, type), 520 FIELD(unsigned short, type),
521 FIELD(unsigned char, flags), 521 FIELD(unsigned char, flags),
522 FIELD(unsigned char, preempt_count), 522 FIELD(unsigned char, preempt_count),
523 FIELD(int, pid), 523 FIELD(int, pid),
524 FIELD(int, lock_depth)); 524 FIELD(int, lock_depth));
525} 525}
526 526
527static ssize_t 527static ssize_t
@@ -874,9 +874,9 @@ event_subsystem_dir(const char *name, struct dentry *d_events)
874 "'%s/filter' entry\n", name); 874 "'%s/filter' entry\n", name);
875 } 875 }
876 876
877 entry = trace_create_file("enable", 0644, system->entry, 877 trace_create_file("enable", 0644, system->entry,
878 (void *)system->name, 878 (void *)system->name,
879 &ftrace_system_enable_fops); 879 &ftrace_system_enable_fops);
880 880
881 return system->entry; 881 return system->entry;
882} 882}
@@ -888,7 +888,6 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events,
888 const struct file_operations *filter, 888 const struct file_operations *filter,
889 const struct file_operations *format) 889 const struct file_operations *format)
890{ 890{
891 struct dentry *entry;
892 int ret; 891 int ret;
893 892
894 /* 893 /*
@@ -906,12 +905,12 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events,
906 } 905 }
907 906
908 if (call->regfunc) 907 if (call->regfunc)
909 entry = trace_create_file("enable", 0644, call->dir, call, 908 trace_create_file("enable", 0644, call->dir, call,
910 enable); 909 enable);
911 910
912 if (call->id && call->profile_enable) 911 if (call->id && call->profile_enable)
913 entry = trace_create_file("id", 0444, call->dir, call, 912 trace_create_file("id", 0444, call->dir, call,
914 id); 913 id);
915 914
916 if (call->define_fields) { 915 if (call->define_fields) {
917 ret = call->define_fields(call); 916 ret = call->define_fields(call);
@@ -920,16 +919,16 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events,
920 " events/%s\n", call->name); 919 " events/%s\n", call->name);
921 return ret; 920 return ret;
922 } 921 }
923 entry = trace_create_file("filter", 0644, call->dir, call, 922 trace_create_file("filter", 0644, call->dir, call,
924 filter); 923 filter);
925 } 924 }
926 925
927 /* A trace may not want to export its format */ 926 /* A trace may not want to export its format */
928 if (!call->show_format) 927 if (!call->show_format)
929 return 0; 928 return 0;
930 929
931 entry = trace_create_file("format", 0444, call->dir, call, 930 trace_create_file("format", 0444, call->dir, call,
932 format); 931 format);
933 932
934 return 0; 933 return 0;
935} 934}