I found not every function on the same file is listed in the /sys/kernel/debug/tracing/available_filter_functions for ftrace.
For example, blk_mq_map_swqueue() is listed but blk_mq_add_queue_tag_set() is not even though there are on the file blik-mq.c.
I check out the document[1] in the linux kernel. It seems not highlight for it except inline function.
What is the criterion for it?
Asked
Active
Viewed 441 times
4

codexplorer
- 541
- 5
- 21
-
4blk_mq_add_queue_tag_set() is called only one time in blk_mq_init_allocated_queue(), so it can probably be inlined – Roman Zaitsev May 24 '18 at 10:07
-
@Roman Zaitsev it makes sense. I will recompile block module with attribute noinline for blk_mq_add_queue_tag_set() and try again. – codexplorer May 24 '18 at 10:35
-
@Roman Zaitsev I rebuilt the kernel and noninlined blk_mq_add_queue_tag_set() then I appears on /sys/kernel/debug/tracing/available_filter_functions. Excellent!! – codexplorer May 25 '18 at 02:08
-
Maybe using trace_printk() is better than noninline a function – codexplorer May 25 '18 at 08:46
-
I'm not sure, but I think, that impact of making function non-inline << impact of calling another function like trace_printk() – Roman Zaitsev May 25 '18 at 09:16
1 Answers
3
As Roman Zaitsev comments, I set attribute noninline for blk_mq_add_queue_tag_set(), and then rebuilt the kernel. It does appear on /sys/kernel/debug/tracing/available_filter_functions. Meanwhile, I can trace it on /sys/kernel/debug/tracing/trace.

codexplorer
- 541
- 5
- 21