Questions tagged [ftrace]
The ftrace tag has no usage guidance.
18
questions
0
votes
0
answers
7
views
Inconsistent output from ftrace trace_pipe
I was trying to trace the kvm:kvm_exit and kvm:kvm_entry events for a few pids. When I do a cat trace_pipe. I noticed that the output format for some of the logs is a bit different from how it ...
0
votes
0
answers
12
views
ftrace cpu_idle state 0 and -1
I have read in here that when using ftrace and we get a cpu_idle line like:
<idle>-0 (-----) [000] .n.1 4536.120761: cpu_idle: state=4294967295 cpu_id=0
this means that the CPU goes back ...
1
vote
0
answers
24
views
How to get the cpu number of a trace event in a custom probe function?
I am registering a probe function for trace events using a Kernel module.
For eg the probe function for the trace event sched_kthread_stop would be:
void handle_kthread_stop(void *data, struct ...
2
votes
1
answer
42
views
Multiple Tracing Events Readers
Question
Does the tracing pipes in Linux, for tracing events, accepts simultaneous readers?
Context
I am trying to get traces from the RAS subsystem while running some benchmarks.
This subsystem ...
2
votes
0
answers
134
views
Linux task state different in /proc/pid/stat compared to Ftrace output of sched events
I'm trying to trace the flow of a piece of code just to understand the points where the tasks go into D/S/R states (uninterruptible/interruptible/running). I do understand the meaning of each state, ...
2
votes
1
answer
124
views
How can I send dmesg printout to ftrace subsystem?
How can I send dmesg printout to ftrace subsystem?
I like correlate the dmesg msg with the functions call graph in ftrace.
Thanks
1
vote
1
answer
259
views
How writing in debugfs controls ftrace?
Ftrace is controlled by manipulating the debug fs files. But how is it possible ? How kernel be aware of writing in this files and start its required actions?for exmple if 1 is written to tracing_on , ...
6
votes
2
answers
649
views
Change format of syscall event trace output to ftrace
I enabled ftrace event tracing for sys_enter_openat syscall. The respective output format given at events/syscalls/sys_enter_openat/format is
print fmt: "dfd: 0x%08lx, filename: 0x%08lx, flags: 0x%...
0
votes
1
answer
45
views
Performance reduction activating trace-functionality in kernel
Is there any performance reduction to be expected from just activating trace (ftrace) functionality in the Linux kernel, but not using it at run time?
0
votes
1
answer
132
views
functions folder in trace_stat folder of ftrace
I am learning ftrace, I read from the following link that I can enable function profiling using the 'function_profile_enabled' file.
mount -t tracefs nodev /sys/kernel/tracing
cd /sys/kernel/tracing
...
1
vote
0
answers
606
views
how to use ftrace to function_trace a kernel modules interrupt?
I have a Banana Pi Arm device with 2 cores (1.2 GHz) running a Debian kernel which I enabled ftrace kernel debug options. I want to determine the amount of time spent in a kernel module function. The ...
2
votes
0
answers
293
views
Tool for displaying timeline view of kernel/userspace execution trace
I've used the ftrace tool trace-cmd for recording scheduling tracepoints and syscall tracepoints. I can inspect them visually using the kernelshark GUI program. It dislays per-core timelines and per-...
1
vote
0
answers
52
views
PMU and tracepoints
I am searching for information about the mechanism of creation of tracepoints. From this topic What are Kernel PMU event-s in perf_events list? and this blog brendangregg I've got that tracepoints are ...
1
vote
0
answers
220
views
Function profiling on multi-core platform for specific PID using ftrace
I'm trying to use ftrace for function profiling based on function_profile_enabled as described here. I would like to capture function calls only for a certain PID using set_ftrace_pid as described in ...
2
votes
1
answer
248
views
Ftrace time duration
I echoed 1 to tracing_on in /sys/kernel/debug/tracing directory and echoed 0 again after a second. However, the timestamp of the first entry is 216.852 and that of the last entry is 234.136 giving me ...
2
votes
1
answer
2k
views
ftrace not working? Probably a simple mistake
I am trying to monitor the function pci_bus_write_config_byte. I have a kernel module that I know for certain calls that function.
echo "pci_bus_write_config_byte" > set_ftrace_filter
Then I did ...
0
votes
1
answer
1k
views
How to get epoch time with trace-cmd (frontend for ftrace)?
<...>-32578 [001] **133767.868869**: kfree: call_site=ffffffff810e6f06 ptr=(nil)
How to make trace-cmd report time in epoch time? The time by default is I think time since ...
8
votes
1
answer
4k
views
filter out certain processes and/or pids in ftrace?
I'm not sure if I'm thinking about this the right way (and please correct me if I'm wrong), but the following is my understanding of ftrace.
In /sys/kernel/debug/tracing, there are the following ...