aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-05-12 15:20:51 -0400
committerThomas Gleixner <tglx@linutronix.de>2008-05-23 14:58:28 -0400
commite309b41dd65aa953f86765eeeecc941d8e1e8b8f (patch)
tree295d4ed6e2a766607f889a04b977ca27cc24929e /kernel/trace/trace.c
parentb53dde9d34f2df396540988ebc65c33400f57b04 (diff)
ftrace: remove notrace
now that we have a kbuild method for notrace, no need to pollute the C code with the annotations. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r--kernel/trace/trace.c94
1 files changed, 47 insertions, 47 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 9022c357032a..f5898051fdd9 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -35,7 +35,7 @@ unsigned long __read_mostly tracing_thresh;
35 35
36static int tracing_disabled = 1; 36static int tracing_disabled = 1;
37 37
38static long notrace 38static long
39ns2usecs(cycle_t nsec) 39ns2usecs(cycle_t nsec)
40{ 40{
41 nsec += 500; 41 nsec += 500;
@@ -43,7 +43,7 @@ ns2usecs(cycle_t nsec)
43 return nsec; 43 return nsec;
44} 44}
45 45
46notrace cycle_t ftrace_now(int cpu) 46cycle_t ftrace_now(int cpu)
47{ 47{
48 return cpu_clock(cpu); 48 return cpu_clock(cpu);
49} 49}
@@ -135,7 +135,7 @@ static DEFINE_SPINLOCK(ftrace_max_lock);
135 * structure. (this way the maximum trace is permanently saved, 135 * structure. (this way the maximum trace is permanently saved,
136 * for later retrieval via /debugfs/tracing/latency_trace) 136 * for later retrieval via /debugfs/tracing/latency_trace)
137 */ 137 */
138static notrace void 138static void
139__update_max_tr(struct trace_array *tr, struct task_struct *tsk, int cpu) 139__update_max_tr(struct trace_array *tr, struct task_struct *tsk, int cpu)
140{ 140{
141 struct trace_array_cpu *data = tr->data[cpu]; 141 struct trace_array_cpu *data = tr->data[cpu];
@@ -184,7 +184,7 @@ void *head_page(struct trace_array_cpu *data)
184 return page_address(page); 184 return page_address(page);
185} 185}
186 186
187static notrace int 187static int
188trace_seq_printf(struct trace_seq *s, const char *fmt, ...) 188trace_seq_printf(struct trace_seq *s, const char *fmt, ...)
189{ 189{
190 int len = (PAGE_SIZE - 1) - s->len; 190 int len = (PAGE_SIZE - 1) - s->len;
@@ -207,7 +207,7 @@ trace_seq_printf(struct trace_seq *s, const char *fmt, ...)
207 return len; 207 return len;
208} 208}
209 209
210static notrace int 210static int
211trace_seq_puts(struct trace_seq *s, const char *str) 211trace_seq_puts(struct trace_seq *s, const char *str)
212{ 212{
213 int len = strlen(str); 213 int len = strlen(str);
@@ -221,7 +221,7 @@ trace_seq_puts(struct trace_seq *s, const char *str)
221 return len; 221 return len;
222} 222}
223 223
224static notrace int 224static int
225trace_seq_putc(struct trace_seq *s, unsigned char c) 225trace_seq_putc(struct trace_seq *s, unsigned char c)
226{ 226{
227 if (s->len >= (PAGE_SIZE - 1)) 227 if (s->len >= (PAGE_SIZE - 1))
@@ -232,7 +232,7 @@ trace_seq_putc(struct trace_seq *s, unsigned char c)
232 return 1; 232 return 1;
233} 233}
234 234
235static notrace int 235static int
236trace_seq_putmem(struct trace_seq *s, void *mem, size_t len) 236trace_seq_putmem(struct trace_seq *s, void *mem, size_t len)
237{ 237{
238 if (len > ((PAGE_SIZE - 1) - s->len)) 238 if (len > ((PAGE_SIZE - 1) - s->len))
@@ -246,7 +246,7 @@ trace_seq_putmem(struct trace_seq *s, void *mem, size_t len)
246 246
247#define HEX_CHARS 17 247#define HEX_CHARS 17
248 248
249static notrace int 249static int
250trace_seq_putmem_hex(struct trace_seq *s, void *mem, size_t len) 250trace_seq_putmem_hex(struct trace_seq *s, void *mem, size_t len)
251{ 251{
252 unsigned char hex[HEX_CHARS]; 252 unsigned char hex[HEX_CHARS];
@@ -285,13 +285,13 @@ trace_seq_putmem_hex(struct trace_seq *s, void *mem, size_t len)
285 return trace_seq_putmem(s, hex, j); 285 return trace_seq_putmem(s, hex, j);
286} 286}
287 287
288static notrace void 288static void
289trace_seq_reset(struct trace_seq *s) 289trace_seq_reset(struct trace_seq *s)
290{ 290{
291 s->len = 0; 291 s->len = 0;
292} 292}
293 293
294static notrace void 294static void
295trace_print_seq(struct seq_file *m, struct trace_seq *s) 295trace_print_seq(struct seq_file *m, struct trace_seq *s)
296{ 296{
297 int len = s->len >= PAGE_SIZE ? PAGE_SIZE - 1 : s->len; 297 int len = s->len >= PAGE_SIZE ? PAGE_SIZE - 1 : s->len;
@@ -302,7 +302,7 @@ trace_print_seq(struct seq_file *m, struct trace_seq *s)
302 trace_seq_reset(s); 302 trace_seq_reset(s);
303} 303}
304 304
305notrace static void 305static void
306flip_trace(struct trace_array_cpu *tr1, struct trace_array_cpu *tr2) 306flip_trace(struct trace_array_cpu *tr1, struct trace_array_cpu *tr2)
307{ 307{
308 struct list_head flip_pages; 308 struct list_head flip_pages;
@@ -323,7 +323,7 @@ flip_trace(struct trace_array_cpu *tr1, struct trace_array_cpu *tr2)
323 check_pages(tr2); 323 check_pages(tr2);
324} 324}
325 325
326notrace void 326void
327update_max_tr(struct trace_array *tr, struct task_struct *tsk, int cpu) 327update_max_tr(struct trace_array *tr, struct task_struct *tsk, int cpu)
328{ 328{
329 struct trace_array_cpu *data; 329 struct trace_array_cpu *data;
@@ -348,7 +348,7 @@ update_max_tr(struct trace_array *tr, struct task_struct *tsk, int cpu)
348 * @tsk - task with the latency 348 * @tsk - task with the latency
349 * @cpu - the cpu of the buffer to copy. 349 * @cpu - the cpu of the buffer to copy.
350 */ 350 */
351notrace void 351void
352update_max_tr_single(struct trace_array *tr, struct task_struct *tsk, int cpu) 352update_max_tr_single(struct trace_array *tr, struct task_struct *tsk, int cpu)
353{ 353{
354 struct trace_array_cpu *data = tr->data[cpu]; 354 struct trace_array_cpu *data = tr->data[cpu];
@@ -471,7 +471,7 @@ void unregister_tracer(struct tracer *type)
471 mutex_unlock(&trace_types_lock); 471 mutex_unlock(&trace_types_lock);
472} 472}
473 473
474notrace void tracing_reset(struct trace_array_cpu *data) 474void tracing_reset(struct trace_array_cpu *data)
475{ 475{
476 data->trace_idx = 0; 476 data->trace_idx = 0;
477 data->trace_head = data->trace_tail = head_page(data); 477 data->trace_head = data->trace_tail = head_page(data);
@@ -494,9 +494,9 @@ static void trace_init_cmdlines(void)
494 cmdline_idx = 0; 494 cmdline_idx = 0;
495} 495}
496 496
497notrace void trace_stop_cmdline_recording(void); 497void trace_stop_cmdline_recording(void);
498 498
499static notrace void trace_save_cmdline(struct task_struct *tsk) 499static void trace_save_cmdline(struct task_struct *tsk)
500{ 500{
501 unsigned map; 501 unsigned map;
502 unsigned idx; 502 unsigned idx;
@@ -531,7 +531,7 @@ static notrace void trace_save_cmdline(struct task_struct *tsk)
531 spin_unlock(&trace_cmdline_lock); 531 spin_unlock(&trace_cmdline_lock);
532} 532}
533 533
534static notrace char *trace_find_cmdline(int pid) 534static char *trace_find_cmdline(int pid)
535{ 535{
536 char *cmdline = "<...>"; 536 char *cmdline = "<...>";
537 unsigned map; 537 unsigned map;
@@ -552,7 +552,7 @@ static notrace char *trace_find_cmdline(int pid)
552 return cmdline; 552 return cmdline;
553} 553}
554 554
555notrace void tracing_record_cmdline(struct task_struct *tsk) 555void tracing_record_cmdline(struct task_struct *tsk)
556{ 556{
557 if (atomic_read(&trace_record_cmdline_disabled)) 557 if (atomic_read(&trace_record_cmdline_disabled))
558 return; 558 return;
@@ -560,7 +560,7 @@ notrace void tracing_record_cmdline(struct task_struct *tsk)
560 trace_save_cmdline(tsk); 560 trace_save_cmdline(tsk);
561} 561}
562 562
563static inline notrace struct list_head * 563static inline struct list_head *
564trace_next_list(struct trace_array_cpu *data, struct list_head *next) 564trace_next_list(struct trace_array_cpu *data, struct list_head *next)
565{ 565{
566 /* 566 /*
@@ -574,7 +574,7 @@ trace_next_list(struct trace_array_cpu *data, struct list_head *next)
574 return next; 574 return next;
575} 575}
576 576
577static inline notrace void * 577static inline void *
578trace_next_page(struct trace_array_cpu *data, void *addr) 578trace_next_page(struct trace_array_cpu *data, void *addr)
579{ 579{
580 struct list_head *next; 580 struct list_head *next;
@@ -588,7 +588,7 @@ trace_next_page(struct trace_array_cpu *data, void *addr)
588 return page_address(page); 588 return page_address(page);
589} 589}
590 590
591static inline notrace struct trace_entry * 591static inline struct trace_entry *
592tracing_get_trace_entry(struct trace_array *tr, struct trace_array_cpu *data) 592tracing_get_trace_entry(struct trace_array *tr, struct trace_array_cpu *data)
593{ 593{
594 unsigned long idx, idx_next; 594 unsigned long idx, idx_next;
@@ -623,7 +623,7 @@ tracing_get_trace_entry(struct trace_array *tr, struct trace_array_cpu *data)
623 return entry; 623 return entry;
624} 624}
625 625
626static inline notrace void 626static inline void
627tracing_generic_entry_update(struct trace_entry *entry, unsigned long flags) 627tracing_generic_entry_update(struct trace_entry *entry, unsigned long flags)
628{ 628{
629 struct task_struct *tsk = current; 629 struct task_struct *tsk = current;
@@ -640,7 +640,7 @@ tracing_generic_entry_update(struct trace_entry *entry, unsigned long flags)
640 (need_resched() ? TRACE_FLAG_NEED_RESCHED : 0); 640 (need_resched() ? TRACE_FLAG_NEED_RESCHED : 0);
641} 641}
642 642
643notrace void 643void
644trace_function(struct trace_array *tr, struct trace_array_cpu *data, 644trace_function(struct trace_array *tr, struct trace_array_cpu *data,
645 unsigned long ip, unsigned long parent_ip, unsigned long flags) 645 unsigned long ip, unsigned long parent_ip, unsigned long flags)
646{ 646{
@@ -659,7 +659,7 @@ trace_function(struct trace_array *tr, struct trace_array_cpu *data,
659 wake_up (&trace_wait); 659 wake_up (&trace_wait);
660} 660}
661 661
662notrace void 662void
663ftrace(struct trace_array *tr, struct trace_array_cpu *data, 663ftrace(struct trace_array *tr, struct trace_array_cpu *data,
664 unsigned long ip, unsigned long parent_ip, unsigned long flags) 664 unsigned long ip, unsigned long parent_ip, unsigned long flags)
665{ 665{
@@ -667,7 +667,7 @@ ftrace(struct trace_array *tr, struct trace_array_cpu *data,
667 trace_function(tr, data, ip, parent_ip, flags); 667 trace_function(tr, data, ip, parent_ip, flags);
668} 668}
669 669
670notrace void 670void
671trace_special(struct trace_array *tr, struct trace_array_cpu *data, 671trace_special(struct trace_array *tr, struct trace_array_cpu *data,
672 unsigned long arg1, unsigned long arg2, unsigned long arg3) 672 unsigned long arg1, unsigned long arg2, unsigned long arg3)
673{ 673{
@@ -687,7 +687,7 @@ trace_special(struct trace_array *tr, struct trace_array_cpu *data,
687 wake_up (&trace_wait); 687 wake_up (&trace_wait);
688} 688}
689 689
690notrace void 690void
691tracing_sched_switch_trace(struct trace_array *tr, 691tracing_sched_switch_trace(struct trace_array *tr,
692 struct trace_array_cpu *data, 692 struct trace_array_cpu *data,
693 struct task_struct *prev, struct task_struct *next, 693 struct task_struct *prev, struct task_struct *next,
@@ -712,7 +712,7 @@ tracing_sched_switch_trace(struct trace_array *tr,
712} 712}
713 713
714#ifdef CONFIG_FTRACE 714#ifdef CONFIG_FTRACE
715static notrace void 715static void
716function_trace_call(unsigned long ip, unsigned long parent_ip) 716function_trace_call(unsigned long ip, unsigned long parent_ip)
717{ 717{
718 struct trace_array *tr = &global_trace; 718 struct trace_array *tr = &global_trace;
@@ -741,12 +741,12 @@ static struct ftrace_ops trace_ops __read_mostly =
741 .func = function_trace_call, 741 .func = function_trace_call,
742}; 742};
743 743
744notrace void tracing_start_function_trace(void) 744void tracing_start_function_trace(void)
745{ 745{
746 register_ftrace_function(&trace_ops); 746 register_ftrace_function(&trace_ops);
747} 747}
748 748
749notrace void tracing_stop_function_trace(void) 749void tracing_stop_function_trace(void)
750{ 750{
751 unregister_ftrace_function(&trace_ops); 751 unregister_ftrace_function(&trace_ops);
752} 752}
@@ -786,7 +786,7 @@ trace_entry_idx(struct trace_array *tr, struct trace_array_cpu *data,
786 return &array[iter->next_page_idx[cpu]]; 786 return &array[iter->next_page_idx[cpu]];
787} 787}
788 788
789static struct trace_entry * notrace 789static struct trace_entry *
790find_next_entry(struct trace_iterator *iter, int *ent_cpu) 790find_next_entry(struct trace_iterator *iter, int *ent_cpu)
791{ 791{
792 struct trace_array *tr = iter->tr; 792 struct trace_array *tr = iter->tr;
@@ -813,7 +813,7 @@ find_next_entry(struct trace_iterator *iter, int *ent_cpu)
813 return next; 813 return next;
814} 814}
815 815
816static notrace void trace_iterator_increment(struct trace_iterator *iter) 816static void trace_iterator_increment(struct trace_iterator *iter)
817{ 817{
818 iter->idx++; 818 iter->idx++;
819 iter->next_idx[iter->cpu]++; 819 iter->next_idx[iter->cpu]++;
@@ -828,7 +828,7 @@ static notrace void trace_iterator_increment(struct trace_iterator *iter)
828 } 828 }
829} 829}
830 830
831static notrace void trace_consume(struct trace_iterator *iter) 831static void trace_consume(struct trace_iterator *iter)
832{ 832{
833 struct trace_array_cpu *data = iter->tr->data[iter->cpu]; 833 struct trace_array_cpu *data = iter->tr->data[iter->cpu];
834 834
@@ -844,7 +844,7 @@ static notrace void trace_consume(struct trace_iterator *iter)
844 data->trace_idx = 0; 844 data->trace_idx = 0;
845} 845}
846 846
847static notrace void *find_next_entry_inc(struct trace_iterator *iter) 847static void *find_next_entry_inc(struct trace_iterator *iter)
848{ 848{
849 struct trace_entry *next; 849 struct trace_entry *next;
850 int next_cpu = -1; 850 int next_cpu = -1;
@@ -863,7 +863,7 @@ static notrace void *find_next_entry_inc(struct trace_iterator *iter)
863 return next ? iter : NULL; 863 return next ? iter : NULL;
864} 864}
865 865
866static notrace void *s_next(struct seq_file *m, void *v, loff_t *pos) 866static void *s_next(struct seq_file *m, void *v, loff_t *pos)
867{ 867{
868 struct trace_iterator *iter = m->private; 868 struct trace_iterator *iter = m->private;
869 void *last_ent = iter->ent; 869 void *last_ent = iter->ent;
@@ -978,7 +978,7 @@ seq_print_sym_offset(struct trace_seq *s, const char *fmt,
978# define IP_FMT "%016lx" 978# define IP_FMT "%016lx"
979#endif 979#endif
980 980
981static notrace int 981static int
982seq_print_ip_sym(struct trace_seq *s, unsigned long ip, unsigned long sym_flags) 982seq_print_ip_sym(struct trace_seq *s, unsigned long ip, unsigned long sym_flags)
983{ 983{
984 int ret; 984 int ret;
@@ -999,7 +999,7 @@ seq_print_ip_sym(struct trace_seq *s, unsigned long ip, unsigned long sym_flags)
999 return ret; 999 return ret;
1000} 1000}
1001 1001
1002static notrace void print_lat_help_header(struct seq_file *m) 1002static void print_lat_help_header(struct seq_file *m)
1003{ 1003{
1004 seq_puts(m, "# _------=> CPU# \n"); 1004 seq_puts(m, "# _------=> CPU# \n");
1005 seq_puts(m, "# / _-----=> irqs-off \n"); 1005 seq_puts(m, "# / _-----=> irqs-off \n");
@@ -1012,14 +1012,14 @@ static notrace void print_lat_help_header(struct seq_file *m)
1012 seq_puts(m, "# \\ / ||||| \\ | / \n"); 1012 seq_puts(m, "# \\ / ||||| \\ | / \n");
1013} 1013}
1014 1014
1015static notrace void print_func_help_header(struct seq_file *m) 1015static void print_func_help_header(struct seq_file *m)
1016{ 1016{
1017 seq_puts(m, "# TASK-PID CPU# TIMESTAMP FUNCTION\n"); 1017 seq_puts(m, "# TASK-PID CPU# TIMESTAMP FUNCTION\n");
1018 seq_puts(m, "# | | | | |\n"); 1018 seq_puts(m, "# | | | | |\n");
1019} 1019}
1020 1020
1021 1021
1022static notrace void 1022static void
1023print_trace_header(struct seq_file *m, struct trace_iterator *iter) 1023print_trace_header(struct seq_file *m, struct trace_iterator *iter)
1024{ 1024{
1025 unsigned long sym_flags = (trace_flags & TRACE_ITER_SYM_MASK); 1025 unsigned long sym_flags = (trace_flags & TRACE_ITER_SYM_MASK);
@@ -1090,7 +1090,7 @@ print_trace_header(struct seq_file *m, struct trace_iterator *iter)
1090 seq_puts(m, "\n"); 1090 seq_puts(m, "\n");
1091} 1091}
1092 1092
1093static notrace void 1093static void
1094lat_print_generic(struct trace_seq *s, struct trace_entry *entry, int cpu) 1094lat_print_generic(struct trace_seq *s, struct trace_entry *entry, int cpu)
1095{ 1095{
1096 int hardirq, softirq; 1096 int hardirq, softirq;
@@ -1127,7 +1127,7 @@ lat_print_generic(struct trace_seq *s, struct trace_entry *entry, int cpu)
1127 1127
1128unsigned long preempt_mark_thresh = 100; 1128unsigned long preempt_mark_thresh = 100;
1129 1129
1130static notrace void 1130static void
1131lat_print_timestamp(struct trace_seq *s, unsigned long long abs_usecs, 1131lat_print_timestamp(struct trace_seq *s, unsigned long long abs_usecs,
1132 unsigned long rel_usecs) 1132 unsigned long rel_usecs)
1133{ 1133{
@@ -1142,7 +1142,7 @@ lat_print_timestamp(struct trace_seq *s, unsigned long long abs_usecs,
1142 1142
1143static const char state_to_char[] = TASK_STATE_TO_CHAR_STR; 1143static const char state_to_char[] = TASK_STATE_TO_CHAR_STR;
1144 1144
1145static notrace int 1145static int
1146print_lat_fmt(struct trace_iterator *iter, unsigned int trace_idx, int cpu) 1146print_lat_fmt(struct trace_iterator *iter, unsigned int trace_idx, int cpu)
1147{ 1147{
1148 struct trace_seq *s = &iter->seq; 1148 struct trace_seq *s = &iter->seq;
@@ -1206,7 +1206,7 @@ print_lat_fmt(struct trace_iterator *iter, unsigned int trace_idx, int cpu)
1206 return 1; 1206 return 1;
1207} 1207}
1208 1208
1209static notrace int print_trace_fmt(struct trace_iterator *iter) 1209static int print_trace_fmt(struct trace_iterator *iter)
1210{ 1210{
1211 struct trace_seq *s = &iter->seq; 1211 struct trace_seq *s = &iter->seq;
1212 unsigned long sym_flags = (trace_flags & TRACE_ITER_SYM_MASK); 1212 unsigned long sym_flags = (trace_flags & TRACE_ITER_SYM_MASK);
@@ -1279,7 +1279,7 @@ static notrace int print_trace_fmt(struct trace_iterator *iter)
1279 return 1; 1279 return 1;
1280} 1280}
1281 1281
1282static notrace int print_raw_fmt(struct trace_iterator *iter) 1282static int print_raw_fmt(struct trace_iterator *iter)
1283{ 1283{
1284 struct trace_seq *s = &iter->seq; 1284 struct trace_seq *s = &iter->seq;
1285 struct trace_entry *entry; 1285 struct trace_entry *entry;
@@ -1336,7 +1336,7 @@ do { \
1336 return 0; \ 1336 return 0; \
1337} while (0) 1337} while (0)
1338 1338
1339static notrace int print_hex_fmt(struct trace_iterator *iter) 1339static int print_hex_fmt(struct trace_iterator *iter)
1340{ 1340{
1341 struct trace_seq *s = &iter->seq; 1341 struct trace_seq *s = &iter->seq;
1342 unsigned char newline = '\n'; 1342 unsigned char newline = '\n';
@@ -1375,7 +1375,7 @@ static notrace int print_hex_fmt(struct trace_iterator *iter)
1375 return 1; 1375 return 1;
1376} 1376}
1377 1377
1378static notrace int print_bin_fmt(struct trace_iterator *iter) 1378static int print_bin_fmt(struct trace_iterator *iter)
1379{ 1379{
1380 struct trace_seq *s = &iter->seq; 1380 struct trace_seq *s = &iter->seq;
1381 struct trace_entry *entry; 1381 struct trace_entry *entry;
@@ -1475,7 +1475,7 @@ static struct seq_operations tracer_seq_ops = {
1475 .show = s_show, 1475 .show = s_show,
1476}; 1476};
1477 1477
1478static struct trace_iterator notrace * 1478static struct trace_iterator *
1479__tracing_open(struct inode *inode, struct file *file, int *ret) 1479__tracing_open(struct inode *inode, struct file *file, int *ret)
1480{ 1480{
1481 struct trace_iterator *iter; 1481 struct trace_iterator *iter;
@@ -1572,7 +1572,7 @@ static int tracing_lt_open(struct inode *inode, struct file *file)
1572} 1572}
1573 1573
1574 1574
1575static notrace void * 1575static void *
1576t_next(struct seq_file *m, void *v, loff_t *pos) 1576t_next(struct seq_file *m, void *v, loff_t *pos)
1577{ 1577{
1578 struct tracer *t = m->private; 1578 struct tracer *t = m->private;