blob: b295d3106bfe3540aab66d0c50e54355a0c8a425 [file] [log] [blame]
Arnaldo Carvalho de Melo16444a82008-05-12 21:20:42 +02001#ifndef _LINUX_FTRACE_H
2#define _LINUX_FTRACE_H
3
Arnaldo Carvalho de Melo16444a82008-05-12 21:20:42 +02004#include <linux/linkage.h>
Ingo Molnard49dbf32008-05-16 10:41:53 +02005#include <linux/fs.h>
Steven Noonaneb7fa9352008-10-02 12:00:07 -07006#include <linux/ktime.h>
Frédéric Weisbeckerd13744c2008-09-23 11:32:08 +01007#include <linux/init.h>
8#include <linux/types.h>
Frederic Weisbecker56010202008-10-02 13:26:05 +02009#include <linux/kallsyms.h>
Steven Rostedtea4e2bc2008-12-03 15:36:57 -050010#include <linux/bitops.h>
Arnaldo Carvalho de Melo16444a82008-05-12 21:20:42 +020011
Steven Rostedt606576c2008-10-06 19:06:12 -040012#ifdef CONFIG_FUNCTION_TRACER
Ingo Molnar3e1932a2008-10-02 17:45:47 +020013
Steven Rostedtb0fc4942008-05-12 21:20:43 +020014extern int ftrace_enabled;
15extern int
16ftrace_enable_sysctl(struct ctl_table *table, int write,
17 struct file *filp, void __user *buffer, size_t *lenp,
18 loff_t *ppos);
19
Arnaldo Carvalho de Melo16444a82008-05-12 21:20:42 +020020typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip);
21
22struct ftrace_ops {
23 ftrace_func_t func;
24 struct ftrace_ops *next;
25};
26
Steven Rostedt60a7ecf2008-11-05 16:05:44 -050027extern int function_trace_stop;
28
Frederic Weisbeckere7d37372008-11-16 06:02:06 +010029/*
30 * Type of the current tracing.
31 */
32enum ftrace_tracing_type_t {
33 FTRACE_TYPE_ENTER = 0, /* Hook the call of the function */
34 FTRACE_TYPE_RETURN, /* Hook the return of the function */
35};
36
37/* Current tracing type, default is FTRACE_TYPE_ENTER */
38extern enum ftrace_tracing_type_t ftrace_tracing_type;
39
Steven Rostedt60a7ecf2008-11-05 16:05:44 -050040/**
41 * ftrace_stop - stop function tracer.
42 *
43 * A quick way to stop the function tracer. Note this an on off switch,
44 * it is not something that is recursive like preempt_disable.
45 * This does not disable the calling of mcount, it only stops the
46 * calling of functions from mcount.
47 */
48static inline void ftrace_stop(void)
49{
50 function_trace_stop = 1;
51}
52
53/**
54 * ftrace_start - start the function tracer.
55 *
56 * This function is the inverse of ftrace_stop. This does not enable
57 * the function tracing if the function tracer is disabled. This only
58 * sets the function tracer flag to continue calling the functions
59 * from mcount.
60 */
61static inline void ftrace_start(void)
62{
63 function_trace_stop = 0;
64}
65
Arnaldo Carvalho de Melo16444a82008-05-12 21:20:42 +020066/*
67 * The ftrace_ops must be a static and should also
68 * be read_mostly. These functions do modify read_mostly variables
69 * so use them sparely. Never free an ftrace_op or modify the
70 * next pointer after it has been registered. Even after unregistering
71 * it, the next pointer may still be used internally.
72 */
73int register_ftrace_function(struct ftrace_ops *ops);
74int unregister_ftrace_function(struct ftrace_ops *ops);
75void clear_ftrace_function(void);
76
77extern void ftrace_stub(unsigned long a0, unsigned long a1);
Arnaldo Carvalho de Melo16444a82008-05-12 21:20:42 +020078
Steven Rostedt606576c2008-10-06 19:06:12 -040079#else /* !CONFIG_FUNCTION_TRACER */
Arnaldo Carvalho de Melo16444a82008-05-12 21:20:42 +020080# define register_ftrace_function(ops) do { } while (0)
81# define unregister_ftrace_function(ops) do { } while (0)
82# define clear_ftrace_function(ops) do { } while (0)
Steven Rostedt81adbdc2008-10-23 09:33:02 -040083static inline void ftrace_kill(void) { }
Steven Rostedt60a7ecf2008-11-05 16:05:44 -050084static inline void ftrace_stop(void) { }
85static inline void ftrace_start(void) { }
Steven Rostedt606576c2008-10-06 19:06:12 -040086#endif /* CONFIG_FUNCTION_TRACER */
Steven Rostedt352ad252008-05-12 21:20:42 +020087
Steven Rostedt3d083392008-05-12 21:20:42 +020088#ifdef CONFIG_DYNAMIC_FTRACE
Steven Rostedt31e88902008-11-14 16:21:19 -080089/* asm/ftrace.h must be defined for archs supporting dynamic ftrace */
90#include <asm/ftrace.h>
91
Steven Rostedt3c1720f2008-05-12 21:20:43 +020092enum {
Steven Rostedt37ad5082008-05-12 21:20:48 +020093 FTRACE_FL_FREE = (1 << 0),
94 FTRACE_FL_FAILED = (1 << 1),
95 FTRACE_FL_FILTER = (1 << 2),
96 FTRACE_FL_ENABLED = (1 << 3),
Steven Rostedt41c52c02008-05-22 11:46:33 -040097 FTRACE_FL_NOTRACE = (1 << 4),
Abhishek Sagar0eb96702008-06-01 21:47:30 +053098 FTRACE_FL_CONVERTED = (1 << 5),
Abhishek Sagarecea6562008-06-21 23:47:53 +053099 FTRACE_FL_FROZEN = (1 << 6),
Steven Rostedt3c1720f2008-05-12 21:20:43 +0200100};
101
Steven Rostedt3d083392008-05-12 21:20:42 +0200102struct dyn_ftrace {
Steven Rostedt08f5ac902008-10-23 09:33:07 -0400103 struct list_head list;
104 unsigned long ip; /* address of mcount call-site */
105 unsigned long flags;
Steven Rostedt31e88902008-11-14 16:21:19 -0800106 struct dyn_arch_ftrace arch;
Steven Rostedt3d083392008-05-12 21:20:42 +0200107};
108
Steven Rostedte1c08bd2008-05-12 21:20:44 +0200109int ftrace_force_update(void);
Steven Rostedt77a2b372008-05-12 21:20:45 +0200110void ftrace_set_filter(unsigned char *buf, int len, int reset);
Steven Rostedte1c08bd2008-05-12 21:20:44 +0200111
Steven Rostedt3d083392008-05-12 21:20:42 +0200112/* defined in arch */
Steven Rostedt3c1720f2008-05-12 21:20:43 +0200113extern int ftrace_ip_converted(unsigned long ip);
Steven Rostedtd61f82d2008-05-12 21:20:43 +0200114extern int ftrace_dyn_arch_init(void *data);
Steven Rostedtd61f82d2008-05-12 21:20:43 +0200115extern int ftrace_update_ftrace_func(ftrace_func_t func);
116extern void ftrace_caller(void);
117extern void ftrace_call(void);
118extern void mcount_call(void);
Frederic Weisbeckerfb526072008-11-25 21:07:04 +0100119#ifdef CONFIG_FUNCTION_GRAPH_TRACER
120extern void ftrace_graph_caller(void);
Steven Rostedt5a45cfe2008-11-26 00:16:24 -0500121extern int ftrace_enable_ftrace_graph_caller(void);
122extern int ftrace_disable_ftrace_graph_caller(void);
123#else
124static inline int ftrace_enable_ftrace_graph_caller(void) { return 0; }
125static inline int ftrace_disable_ftrace_graph_caller(void) { return 0; }
Frederic Weisbeckere7d37372008-11-16 06:02:06 +0100126#endif
Steven Rostedtad90c0e2008-05-27 20:48:37 -0400127
Steven Rostedt593eb8a2008-10-23 09:32:59 -0400128/**
Steven Rostedt31e88902008-11-14 16:21:19 -0800129 * ftrace_make_nop - convert code into top
130 * @mod: module structure if called by module load initialization
131 * @rec: the mcount call site record
132 * @addr: the address that the call site should be calling
Steven Rostedt593eb8a2008-10-23 09:32:59 -0400133 *
134 * This is a very sensitive operation and great care needs
135 * to be taken by the arch. The operation should carefully
136 * read the location, check to see if what is read is indeed
137 * what we expect it to be, and then on success of the compare,
138 * it should write to the location.
139 *
Steven Rostedt31e88902008-11-14 16:21:19 -0800140 * The code segment at @rec->ip should be a caller to @addr
141 *
Steven Rostedt593eb8a2008-10-23 09:32:59 -0400142 * Return must be:
143 * 0 on success
144 * -EFAULT on error reading the location
145 * -EINVAL on a failed compare of the contents
146 * -EPERM on error writing to the location
147 * Any other value will be considered a failure.
148 */
Steven Rostedt31e88902008-11-14 16:21:19 -0800149extern int ftrace_make_nop(struct module *mod,
150 struct dyn_ftrace *rec, unsigned long addr);
151
152/**
153 * ftrace_make_call - convert a nop call site into a call to addr
154 * @rec: the mcount call site record
155 * @addr: the address that the call site should call
156 *
157 * This is a very sensitive operation and great care needs
158 * to be taken by the arch. The operation should carefully
159 * read the location, check to see if what is read is indeed
160 * what we expect it to be, and then on success of the compare,
161 * it should write to the location.
162 *
163 * The code segment at @rec->ip should be a nop
164 *
165 * Return must be:
166 * 0 on success
167 * -EFAULT on error reading the location
168 * -EINVAL on a failed compare of the contents
169 * -EPERM on error writing to the location
170 * Any other value will be considered a failure.
171 */
172extern int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr);
173
174
175/* May be defined in arch */
176extern int ftrace_arch_read_dyn_info(char *buf, int size);
Steven Rostedt593eb8a2008-10-23 09:32:59 -0400177
Abhishek Sagarecea6562008-06-21 23:47:53 +0530178extern int skip_trace(unsigned long ip);
179
Steven Rostedtc0719e52008-09-06 01:06:03 -0400180extern void ftrace_release(void *start, unsigned long size);
181
182extern void ftrace_disable_daemon(void);
183extern void ftrace_enable_daemon(void);
Steven Rostedte1c08bd2008-05-12 21:20:44 +0200184#else
Abhishek Sagarecea6562008-06-21 23:47:53 +0530185# define skip_trace(ip) ({ 0; })
Ingo Molnaraeaee8a2008-05-12 21:20:49 +0200186# define ftrace_force_update() ({ 0; })
187# define ftrace_set_filter(buf, len, reset) do { } while (0)
Steven Rostedtad90c0e2008-05-27 20:48:37 -0400188# define ftrace_disable_daemon() do { } while (0)
189# define ftrace_enable_daemon() do { } while (0)
Steven Rostedtc0719e52008-09-06 01:06:03 -0400190static inline void ftrace_release(void *start, unsigned long size) { }
Abhishek Sagarecea6562008-06-21 23:47:53 +0530191#endif /* CONFIG_DYNAMIC_FTRACE */
Steven Rostedt352ad252008-05-12 21:20:42 +0200192
Ingo Molnaraeaee8a2008-05-12 21:20:49 +0200193/* totally disable ftrace - can not re-enable after this */
194void ftrace_kill(void);
195
Ingo Molnarf43fdad2008-05-12 21:20:43 +0200196static inline void tracer_disable(void)
197{
Steven Rostedt606576c2008-10-06 19:06:12 -0400198#ifdef CONFIG_FUNCTION_TRACER
Ingo Molnarf43fdad2008-05-12 21:20:43 +0200199 ftrace_enabled = 0;
200#endif
201}
202
Huang Ying37002732008-08-18 16:24:56 +0800203/*
204 * Ftrace disable/restore without lock. Some synchronization mechanism
Huang Ying9bdeb7b2008-08-15 00:40:25 -0700205 * must be used to prevent ftrace_enabled to be changed between
Huang Ying37002732008-08-18 16:24:56 +0800206 * disable/restore.
207 */
Huang Ying9bdeb7b2008-08-15 00:40:25 -0700208static inline int __ftrace_enabled_save(void)
209{
Steven Rostedt606576c2008-10-06 19:06:12 -0400210#ifdef CONFIG_FUNCTION_TRACER
Huang Ying9bdeb7b2008-08-15 00:40:25 -0700211 int saved_ftrace_enabled = ftrace_enabled;
212 ftrace_enabled = 0;
213 return saved_ftrace_enabled;
214#else
215 return 0;
216#endif
217}
218
219static inline void __ftrace_enabled_restore(int enabled)
220{
Steven Rostedt606576c2008-10-06 19:06:12 -0400221#ifdef CONFIG_FUNCTION_TRACER
Huang Ying9bdeb7b2008-08-15 00:40:25 -0700222 ftrace_enabled = enabled;
223#endif
224}
225
Steven Rostedt352ad252008-05-12 21:20:42 +0200226#ifdef CONFIG_FRAME_POINTER
227/* TODO: need to fix this for ARM */
228# define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0))
229# define CALLER_ADDR1 ((unsigned long)__builtin_return_address(1))
230# define CALLER_ADDR2 ((unsigned long)__builtin_return_address(2))
231# define CALLER_ADDR3 ((unsigned long)__builtin_return_address(3))
232# define CALLER_ADDR4 ((unsigned long)__builtin_return_address(4))
233# define CALLER_ADDR5 ((unsigned long)__builtin_return_address(5))
Ingo Molnar86387f72008-05-12 21:20:51 +0200234# define CALLER_ADDR6 ((unsigned long)__builtin_return_address(6))
Steven Rostedt352ad252008-05-12 21:20:42 +0200235#else
236# define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0))
237# define CALLER_ADDR1 0UL
238# define CALLER_ADDR2 0UL
239# define CALLER_ADDR3 0UL
240# define CALLER_ADDR4 0UL
241# define CALLER_ADDR5 0UL
Ingo Molnar86387f72008-05-12 21:20:51 +0200242# define CALLER_ADDR6 0UL
Steven Rostedt352ad252008-05-12 21:20:42 +0200243#endif
244
Steven Rostedt81d68a92008-05-12 21:20:42 +0200245#ifdef CONFIG_IRQSOFF_TRACER
Ingo Molnar489f1392008-02-25 13:38:05 +0100246 extern void time_hardirqs_on(unsigned long a0, unsigned long a1);
247 extern void time_hardirqs_off(unsigned long a0, unsigned long a1);
Steven Rostedt81d68a92008-05-12 21:20:42 +0200248#else
249# define time_hardirqs_on(a0, a1) do { } while (0)
250# define time_hardirqs_off(a0, a1) do { } while (0)
251#endif
252
Steven Rostedt6cd8a4b2008-05-12 21:20:42 +0200253#ifdef CONFIG_PREEMPT_TRACER
Ingo Molnar489f1392008-02-25 13:38:05 +0100254 extern void trace_preempt_on(unsigned long a0, unsigned long a1);
255 extern void trace_preempt_off(unsigned long a0, unsigned long a1);
Steven Rostedt6cd8a4b2008-05-12 21:20:42 +0200256#else
257# define trace_preempt_on(a0, a1) do { } while (0)
258# define trace_preempt_off(a0, a1) do { } while (0)
259#endif
260
Ingo Molnarb1829d22008-05-28 01:22:08 +0200261#ifdef CONFIG_TRACING
Steven Rostedt944ac422008-10-23 19:26:08 -0400262extern int ftrace_dump_on_oops;
263
Steven Rostedt0f048702008-11-05 16:05:44 -0500264extern void tracing_start(void);
265extern void tracing_stop(void);
Steven Rostedt69bb54e2008-11-21 12:59:38 -0500266extern void ftrace_off_permanent(void);
Steven Rostedt0f048702008-11-05 16:05:44 -0500267
Ingo Molnar74f4e362008-05-12 21:21:15 +0200268extern void
269ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3);
Steven Rostedt2f2c99d2008-08-01 16:45:49 -0400270
271/**
272 * ftrace_printk - printf formatting in the ftrace buffer
273 * @fmt: the printf format for printing
274 *
275 * Note: __ftrace_printk is an internal function for ftrace_printk and
276 * the @ip is passed in via the ftrace_printk macro.
277 *
278 * This function allows a kernel developer to debug fast path sections
279 * that printk is not appropriate for. By scattering in various
280 * printk like tracing in the code, a developer can quickly see
281 * where problems are occurring.
282 *
283 * This is intended as a debugging tool for the developer only.
284 * Please refrain from leaving ftrace_printks scattered around in
285 * your code.
286 */
287# define ftrace_printk(fmt...) __ftrace_printk(_THIS_IP_, fmt)
Steven Rostedtdd0e5452008-08-01 12:26:41 -0400288extern int
289__ftrace_printk(unsigned long ip, const char *fmt, ...)
290 __attribute__ ((format (printf, 2, 3)));
Steven Rostedt3f5a54e2008-07-30 22:36:46 -0400291extern void ftrace_dump(void);
Ingo Molnar74f4e362008-05-12 21:21:15 +0200292#else
293static inline void
294ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3) { }
Steven Rostedtdd0e5452008-08-01 12:26:41 -0400295static inline int
Ingo Molnar7b928c22008-08-15 17:48:02 +0200296ftrace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 0)));
297
Steven Rostedt0f048702008-11-05 16:05:44 -0500298static inline void tracing_start(void) { }
299static inline void tracing_stop(void) { }
Steven Rostedt69bb54e2008-11-21 12:59:38 -0500300static inline void ftrace_off_permanent(void) { }
Ingo Molnar7b928c22008-08-15 17:48:02 +0200301static inline int
302ftrace_printk(const char *fmt, ...)
Steven Rostedtdd0e5452008-08-01 12:26:41 -0400303{
304 return 0;
305}
Steven Rostedt3f5a54e2008-07-30 22:36:46 -0400306static inline void ftrace_dump(void) { }
Ingo Molnar74f4e362008-05-12 21:21:15 +0200307#endif
308
Steven Rostedt68bf21a2008-08-14 15:45:08 -0400309#ifdef CONFIG_FTRACE_MCOUNT_RECORD
310extern void ftrace_init(void);
Steven Rostedt31e88902008-11-14 16:21:19 -0800311extern void ftrace_init_module(struct module *mod,
312 unsigned long *start, unsigned long *end);
Steven Rostedt68bf21a2008-08-14 15:45:08 -0400313#else
314static inline void ftrace_init(void) { }
Steven Rostedt90d595f2008-08-14 15:45:09 -0400315static inline void
Steven Rostedt31e88902008-11-14 16:21:19 -0800316ftrace_init_module(struct module *mod,
317 unsigned long *start, unsigned long *end) { }
Steven Rostedt68bf21a2008-08-14 15:45:08 -0400318#endif
319
Arjan van de Venf3f47a62008-11-23 16:49:58 -0800320enum {
321 POWER_NONE = 0,
322 POWER_CSTATE = 1,
323 POWER_PSTATE = 2,
324};
325
326struct power_trace {
327#ifdef CONFIG_POWER_TRACER
328 ktime_t stamp;
329 ktime_t end;
330 int type;
331 int state;
332#endif
333};
334
335#ifdef CONFIG_POWER_TRACER
336extern void trace_power_start(struct power_trace *it, unsigned int type,
337 unsigned int state);
338extern void trace_power_mark(struct power_trace *it, unsigned int type,
339 unsigned int state);
340extern void trace_power_end(struct power_trace *it);
341#else
342static inline void trace_power_start(struct power_trace *it, unsigned int type,
343 unsigned int state) { }
344static inline void trace_power_mark(struct power_trace *it, unsigned int type,
345 unsigned int state) { }
346static inline void trace_power_end(struct power_trace *it) { }
347#endif
348
Steven Rostedtdd0e5452008-08-01 12:26:41 -0400349
Frederic Weisbecker71566a02008-10-31 12:57:20 +0100350/*
Frederic Weisbecker287b6e62008-11-26 00:57:25 +0100351 * Structure that defines an entry function trace.
352 */
353struct ftrace_graph_ent {
354 unsigned long func; /* Current function */
355 int depth;
356};
Arnaldo Carvalho de Melo16444a82008-05-12 21:20:42 +0200357
Frederic Weisbecker71566a02008-10-31 12:57:20 +0100358/*
Frederic Weisbeckercaf4b322008-11-11 07:03:45 +0100359 * Structure that defines a return function trace.
360 */
Frederic Weisbeckerfb526072008-11-25 21:07:04 +0100361struct ftrace_graph_ret {
Frederic Weisbeckercaf4b322008-11-11 07:03:45 +0100362 unsigned long func; /* Current function */
363 unsigned long long calltime;
364 unsigned long long rettime;
Frederic Weisbecker02310222008-11-17 03:22:41 +0100365 /* Number of functions that overran the depth limit for current task */
366 unsigned long overrun;
Frederic Weisbecker287b6e62008-11-26 00:57:25 +0100367 int depth;
Frederic Weisbeckercaf4b322008-11-11 07:03:45 +0100368};
369
Frederic Weisbeckerfb526072008-11-25 21:07:04 +0100370#ifdef CONFIG_FUNCTION_GRAPH_TRACER
Frederic Weisbeckerf201ae22008-11-23 06:22:56 +0100371#define FTRACE_RETFUNC_DEPTH 50
372#define FTRACE_RETSTACK_ALLOC_SIZE 32
Frederic Weisbecker287b6e62008-11-26 00:57:25 +0100373/* Type of the callback handlers for tracing function graph*/
374typedef void (*trace_func_graph_ret_t)(struct ftrace_graph_ret *); /* return */
Steven Rostedte49dc192008-12-02 23:50:05 -0500375typedef int (*trace_func_graph_ent_t)(struct ftrace_graph_ent *); /* entry */
Frederic Weisbeckercaf4b322008-11-11 07:03:45 +0100376
Frederic Weisbecker287b6e62008-11-26 00:57:25 +0100377extern int register_ftrace_graph(trace_func_graph_ret_t retfunc,
378 trace_func_graph_ent_t entryfunc);
Frederic Weisbeckerf201ae22008-11-23 06:22:56 +0100379
Steven Rostedt14a866c2008-12-02 23:50:02 -0500380extern void ftrace_graph_stop(void);
381
Frederic Weisbecker287b6e62008-11-26 00:57:25 +0100382/* The current handlers in use */
383extern trace_func_graph_ret_t ftrace_graph_return;
384extern trace_func_graph_ent_t ftrace_graph_entry;
385
Frederic Weisbeckerfb526072008-11-25 21:07:04 +0100386extern void unregister_ftrace_graph(void);
Frederic Weisbeckerf201ae22008-11-23 06:22:56 +0100387
Frederic Weisbeckerfb526072008-11-25 21:07:04 +0100388extern void ftrace_graph_init_task(struct task_struct *t);
389extern void ftrace_graph_exit_task(struct task_struct *t);
Ingo Molnar82f60f02008-11-23 09:18:56 +0100390#else
Frederic Weisbeckerfb526072008-11-25 21:07:04 +0100391static inline void ftrace_graph_init_task(struct task_struct *t) { }
392static inline void ftrace_graph_exit_task(struct task_struct *t) { }
Frederic Weisbeckercaf4b322008-11-11 07:03:45 +0100393#endif
394
Steven Rostedtea4e2bc2008-12-03 15:36:57 -0500395#ifdef CONFIG_TRACING
396#include <linux/sched.h>
397
398/* flags for current->trace */
399enum {
400 TSK_TRACE_FL_TRACE_BIT = 0,
401 TSK_TRACE_FL_GRAPH_BIT = 1,
402};
403enum {
404 TSK_TRACE_FL_TRACE = 1 << TSK_TRACE_FL_TRACE_BIT,
405 TSK_TRACE_FL_GRAPH = 1 << TSK_TRACE_FL_GRAPH_BIT,
406};
407
408static inline void set_tsk_trace_trace(struct task_struct *tsk)
409{
410 set_bit(TSK_TRACE_FL_TRACE_BIT, &tsk->trace);
411}
412
413static inline void clear_tsk_trace_trace(struct task_struct *tsk)
414{
415 clear_bit(TSK_TRACE_FL_TRACE_BIT, &tsk->trace);
416}
417
418static inline int test_tsk_trace_trace(struct task_struct *tsk)
419{
420 return tsk->trace & TSK_TRACE_FL_TRACE;
421}
422
423static inline void set_tsk_trace_graph(struct task_struct *tsk)
424{
425 set_bit(TSK_TRACE_FL_GRAPH_BIT, &tsk->trace);
426}
427
428static inline void clear_tsk_trace_graph(struct task_struct *tsk)
429{
430 clear_bit(TSK_TRACE_FL_GRAPH_BIT, &tsk->trace);
431}
432
433static inline int test_tsk_trace_graph(struct task_struct *tsk)
434{
435 return tsk->trace & TSK_TRACE_FL_GRAPH;
436}
437
438#endif /* CONFIG_TRACING */
439
Arnaldo Carvalho de Melo16444a82008-05-12 21:20:42 +0200440#endif /* _LINUX_FTRACE_H */