I'm using ftrace on Android on a couple of different devices, but I noticed that the output format differs between them. In some cases, the TGID of the current process is included, while in others, it is not.
The TGID is very useful in the current application I'm using ftrace on, and I'm wondering how I could enable that. I'm aware of the sysfs file "/sys/kernel/debug/tracing/options/print-tgid", but this isn't available on my devices, unfortunately. Are there any kernel options or ftrace handles that can be used to add TGID to the ftrace output format?
# _-----=> irqs-off
# / _----=> need-resched
# | / _---=> hardirq/softirq
# || / _--=> preempt-depth
# ||| / delay
# TASK-PID CPU# |||| TIMESTAMP FUNCTION
# | | | |||| | |
# ^^ (no tgid...)
vs
# _-----=> irqs-off
# / _----=> need-resched
# | / _---=> hardirq/softirq
# || / _--=> preempt-depth
# ||| / delay
# TASK-PID TGID CPU# |||| TIMESTAMP FUNCTION
# | | | | |||| | |
# ^^^(tgid is available in this column!)