On 23/07/2019 10:23, Ravindra Kumar Meena wrote:
I said this before, do not add global variables like this:static void print_item( client_context *cctx, const client_item *item ) { switch_event switch_event; event_header_extended event_header_extended; char item_data_str[256]; FILE **f = cctx->event_streams; + static size_t event_counter = 1; + static uint8_t prev_comm[16]; + static int32_t prev_tid; + static uint32_t cpu_id; + static uint64_t ns; Move all your state to client_context. I said also that you have to create the sched_switch event per CPU. Have made changes. https://github.com/rmeena840/rtems-tools/commit/a9e7c343188f2b5dcf2dded0f6b407bcdbcdced3
All your state must be per-CPU otherwise you mix data from different CPUs. -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : [email protected] PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. _______________________________________________ devel mailing list [email protected] http://lists.rtems.org/mailman/listinfo/devel
