summaryrefslogtreecommitdiffstats
path: root/trace/record
diff options
context:
space:
mode:
Diffstat (limited to 'trace/record')
-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(