----- Am 3. Aug 2019 um 18:16 schrieb Ravindra Kumar Meena [email protected]:
> Now, I can get the [thread_id] and [thread_name] in print_item() but since
> this information is not CPU specific so in which CPU should I store this
> information?
Maybe something like this (please remove your hash table):
diff --git a/misc/record/record-main.c b/misc/record/record-main.c
index 20158fd..2cc3a3c 100644
--- a/misc/record/record-main.c
+++ b/misc/record/record-main.c
@@ -190,12 +190,14 @@ typedef struct event_header_extended {
uint64_t ns;
} __attribute__((__packed__)) event_header_extended;
+#define THREAD_NAME_SIZE 16
+
typedef struct switch_event{
- uint8_t prev_comm[16];
+ uint8_t prev_comm[THREAD_NAME_SIZE];
int32_t prev_tid;
int32_t prev_prio;
int64_t prev_state;
- uint8_t next_comm[16];
+ uint8_t next_comm[THREAD_NAME_SIZE];
int32_t next_tid;
int32_t next_prio;
} __attribute__((__packed__)) switch_event;
@@ -222,6 +224,14 @@ typedef struct client_context {
uint64_t content_size[ RTEMS_RECORD_CLIENT_MAXIMUM_CPU_COUNT ];
uint64_t packet_size[ RTEMS_RECORD_CLIENT_MAXIMUM_CPU_COUNT ];
switch_out_int switch_out_int[ RTEMS_RECORD_CLIENT_MAXIMUM_CPU_COUNT ];
+
+ /**
+ * @brief Thread names indexed by API and object index.
+ *
+ * The API indices are 0 for Internal API, 1 for Classic API and 2 for POSIX
API.
+ */
+ char thread_names[3][65536][THREAD_NAME_SIZE];
+
map_data* hashArray[ MAP_SIZE ];
} client_context;
_______________________________________________
devel mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/devel