scheduler-tools / rt-app

rt-app emulates typical mobile and real-time systems use cases and gives runtime information
GNU General Public License v2.0
125 stars 102 forks source link

ftrace_log: Add override for tracefs location #126

Open credp opened 2 years ago

credp commented 2 years ago

It's possible to mount tracefs in other locations - the Google Pixel 6, for example, mounts tracefs at /sys/kernel/tracing rather than the typical location inside debugfs at /sys/kernel/debug/tracing and disallows debugfs from being mounted when running any GKI kernel.

This change allows configurations to select the location where rt-app will attempt to configure tracing when enabled. If it is not supplied, then the intended behaviour is that the existing default should be used.

There should not be any impact on existing json files running on existing systems.

Signed-off-by: "Chris Redpath" chris.redpath@arm.com

credp commented 2 years ago

@DouglasRaillard Here you go - it's tested on my VM but the P6 will be a bit longer as I am starting from scratch on it again.

douglas-raillard-arm commented 2 years ago

@credp it builds but there is a warning to fix:

rt-app_parse_config.c:1210:33: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
 1210 |                 opts->ftracedir = ftrace_dir();
      |                                 ^
credp commented 2 years ago

@credp it builds but there is a warning to fix:

rt-app_parse_config.c:1210:33: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
 1210 |                 opts->ftracedir = ftrace_dir();
      |                                 ^

Ooh, thanks. I changed the ftrace_dir to use strdup instead of using a static string buffer and forgot to fix this bit up. Will repost