aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/scripting-engines/trace-event-python.c
diff options
context:
space:
mode:
authorMichael Weiß <[email protected]>2020-10-27 21:42:57 +0100
committerChristian Brauner <[email protected]>2020-11-03 11:05:39 +0100
commit3ae700ecfae913316e3b4fe5f60c72b6131aaa1f (patch)
treeb6fc855cc317a4f2d4e3f56d4b124b6cfb55d304 /tools/perf/util/scripting-engines/trace-event-python.c
parent31909e3330c8d65e9a928d40833ebd5feb4f64e6 (diff)
fs/proc: apply the time namespace offset to /proc/stat btime
'/proc/stat' provides the field 'btime' which states the time stamp of system boot in seconds. In case of time namespaces, the offset to the boot time stamp was not applied earlier. This confuses tasks which are in another time universe, e.g., in a container of a container runtime which utilize time namespaces to virtualize boottime. Therefore, we make procfs to virtualize also the btime field by subtracting the offset of the timens boottime from 'btime' before printing the stats. Since start_boottime of processes are seconds since boottime and the boottime stamp is now shifted according to the timens offset, the offset of the time namespace also needs to be applied before the process stats are given to userspace. This avoids that processes shown, e.g., by 'ps' appear as time travelers in the corresponding time namespace. Signed-off-by: Michael Weiß <[email protected]> Reviewed-by: Andrei Vagin <[email protected]> Acked-by: Thomas Gleixner <[email protected]> Acked-by: Christian Brauner <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions