summaryrefslogtreecommitdiffstats
path: root/trace
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2019-08-27 08:06:30 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2019-08-27 08:48:27 +0200
commit6c4b7702df584d472e9f214a351fc3d37ac36dc4 (patch)
treed018a3f975f75b037589e37a908806774db5964c /trace
parentrecord: Move base context to client context (diff)
downloadrtems-tools-6c4b7702df584d472e9f214a351fc3d37ac36dc4.tar.bz2
record: Add CPU to idle thread names
Update #3665.
Diffstat (limited to 'trace')
-rw-r--r--trace/record/record-main-lttng.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/trace/record/record-main-lttng.c b/trace/record/record-main-lttng.c
index b08623c..bde15c1 100644
--- a/trace/record/record-main-lttng.c
+++ b/trace/record/record-main-lttng.c
@@ -209,6 +209,19 @@ static void copy_thread_name(
}
memcpy( dst, name, THREAD_NAME_SIZE );
+
+ if ( is_idle_task_by_api_index( api_index ) ) {
+ /*
+ * In Linux, the idle threads are bound to a specific CPU (swapper/n). In
+ * RTEMS, the idle threads can move around, so mimic this Linux behaviour.
+ */
+ snprintf(
+ (char *) dst + 4,
+ THREAD_NAME_SIZE - 4,
+ "/%lu",
+ (unsigned long) item->cpu
+ );
+ }
}
static void write_sched_switch(