Actions
Bug #851
closedAdd perf event context on unsupported architectures
Start date:
10/29/2014
Due date:
% Done:
0%
Estimated time:
Description
When adding a perf counter to the context on an architecture that doesn't support it, I would expect lttng add-context to return me an error, but it tells me it has been added to every channels.
I ran into that issue on a Galaxy Note 3 (ARM based) running Android. Although I don't have any other ARM board I can try this on at the moment.
It can be reproduced as followed :
$ lttng create Session auto-20090221-085733 created. Traces will be written in /sdcard/lttng-traces/auto-20090221-085733 $ lttng enable-event -ua All UST events are enabled in channel channel0 $ lttng add-context -u -t perf:thread:cycles UST context perf:thread:cycles added to all channels
Following in a a log of the sessiond -vvv for each commands which doesn't show any error (unfortunately)
lttng create
DEBUG1 - 08:57:33.144723 [13186/13243]: Wait for client response (in thread_manage_clients() at main.c:4061) DEBUG1 - 08:57:33.144991 [13186/13243]: Receiving data from client ... (in thread_manage_clients() at main.c:4106) DEBUG1 - 08:57:33.146169 [13186/13243]: Nothing recv() from client... continuing (in thread_manage_clients() at main.c:4110) DEBUG1 - 08:57:33.146350 [13186/13243]: Clean command context structure (in clean_command_ctx() at main.c:739) DEBUG1 - 08:57:33.146410 [13186/13243]: Accepting client command ... (in thread_manage_clients() at main.c:4019) DEBUG1 - 08:57:33.148955 [13186/13243]: Wait for client response (in thread_manage_clients() at main.c:4061) DEBUG1 - 08:57:33.149141 [13186/13243]: Receiving data from client ... (in thread_manage_clients() at main.c:4106) DEBUG1 - 08:57:33.149967 [13186/13243]: Processing client command 8 (in process_client_msg() at main.c:2779) DEBUG1 - 08:57:33.150108 [13186/13243]: Waiting for 1 URIs from client ... (in process_client_msg() at main.c:3436) DEBUG2 - 08:57:33.151095 [13186/13243]: Trying to find session by name auto-20090221-085733 (in session_find_by_name() at session.c:169) DEBUG3 - 08:57:33.151271 [13186/13243]: Created hashtable size 4 at 0x12ad190 of type 1 (in lttng_ht_new() at hashtable.c:127) DEBUG1 - 08:57:33.151336 [13186/13243]: Tracing session auto-20090221-085733 created with ID 5 by UID 0 GID 0 (in session_create() at session.c:276) DEBUG2 - 08:57:33.151387 [13186/13243]: Trying to find session by name auto-20090221-085733 (in session_find_by_name() at session.c:169) DEBUG3 - 08:57:33.151458 [13186/13243]: Created hashtable size 4 at 0x12a7b80 of type 1 (in lttng_ht_new() at hashtable.c:127) DEBUG2 - 08:57:33.151517 [13186/13243]: Setting trace directory path from URI to /sdcard/lttng-traces/auto-20090221-085733 (in add_uri_to_consumer() at cmd.c:515) DEBUG1 - 08:57:33.151592 [13186/13243]: Sending response (size: 16, retcode: Success) (in thread_manage_clients() at main.c:4155) DEBUG1 - 08:57:33.151709 [13186/13243]: Clean command context structure (in clean_command_ctx() at main.c:739) DEBUG1 - 08:57:33.151764 [13186/13243]: Accepting client command ... (in thread_manage_clients() at main.c:4019)
lttng enable-event -ua
DEBUG1 - 08:57:45.734624 [13186/13243]: Wait for client response (in thread_manage_clients() at main.c:4061) DEBUG1 - 08:57:45.734884 [13186/13243]: Receiving data from client ... (in thread_manage_clients() at main.c:4106) DEBUG1 - 08:57:45.735975 [13186/13243]: Nothing recv() from client... continuing (in thread_manage_clients() at main.c:4110) DEBUG1 - 08:57:45.736162 [13186/13243]: Clean command context structure (in clean_command_ctx() at main.c:739) DEBUG1 - 08:57:45.736224 [13186/13243]: Accepting client command ... (in thread_manage_clients() at main.c:4019) DEBUG1 - 08:57:45.738073 [13186/13243]: Wait for client response (in thread_manage_clients() at main.c:4061) DEBUG1 - 08:57:45.738255 [13186/13243]: Receiving data from client ... (in thread_manage_clients() at main.c:4106) DEBUG1 - 08:57:45.739052 [13186/13243]: Processing client command 6 (in process_client_msg() at main.c:2779) DEBUG1 - 08:57:45.739167 [13186/13243]: Getting session auto-20090221-085733 by name (in process_client_msg() at main.c:2862) DEBUG2 - 08:57:45.739221 [13186/13243]: Trying to find session by name auto-20090221-085733 (in session_find_by_name() at session.c:169) DEBUG1 - 08:57:45.739280 [13186/13243]: Creating UST session (in create_ust_session() at main.c:2659) DEBUG3 - 08:57:45.739375 [13186/13243]: Created hashtable size 4 at 0x12a0b68 of type 0 (in lttng_ht_new() at hashtable.c:127) DEBUG3 - 08:57:45.739444 [13186/13243]: Created hashtable size 4 at 0x12acfd8 of type 2 (in lttng_ht_new() at hashtable.c:127) DEBUG3 - 08:57:45.739541 [13186/13243]: Created hashtable size 4 at 0x12a8548 of type 1 (in lttng_ht_new() at hashtable.c:127) DEBUG2 - 08:57:45.739594 [13186/13243]: UST trace session create successful (in trace_ust_create_session() at trace-ust.c:289) DEBUG3 - 08:57:45.739644 [13186/13243]: Copying tracing session consumer output in UST session (in copy_session_consumer() at main.c:2607) DEBUG3 - 08:57:45.739785 [13186/13243]: Created hashtable size 4 at 0x12a8760 of type 1 (in lttng_ht_new() at hashtable.c:127) DEBUG3 - 08:57:45.739904 [13186/13243]: Copy session consumer subdir /ust (in copy_session_consumer() at main.c:2625) DEBUG3 - 08:57:45.740004 [13186/13243]: Consumer socket created (fd: 41) and added to output (in consumer_create_socket() at consumer.c:301) DEBUG1 - 08:57:45.740067 [13186/13243]: Setting relayd for session auto-20090221-085733 (in cmd_setup_relayd() at cmd.c:756) DEBUG1 - 08:57:45.740124 [13186/13243]: Enable event command for event '*' (in cmd_enable_event() at cmd.c:1402) DEBUG2 - 08:57:45.740318 [13186/13243]: Trace UST channel channel0 not found by name (in trace_ust_find_channel_by_name() at trace-ust.c:162) DEBUG1 - 08:57:45.740388 [13186/13243]: Enabling channel for session auto-20090221-085733 (in cmd_enable_channel() at cmd.c:944) DEBUG2 - 08:57:45.740442 [13186/13243]: Trace UST channel channel0 not found by name (in trace_ust_find_channel_by_name() at trace-ust.c:162) DEBUG3 - 08:57:45.740515 [13186/13243]: Created hashtable size 4 at 0x12addf8 of type 0 (in lttng_ht_new() at hashtable.c:127) DEBUG3 - 08:57:45.740575 [13186/13243]: Created hashtable size 4 at 0x12ae010 of type 1 (in lttng_ht_new() at hashtable.c:127) DEBUG2 - 08:57:45.740623 [13186/13243]: Trace UST channel channel0 created (in trace_ust_create_channel() at trace-ust.c:357) DEBUG2 - 08:57:45.740676 [13186/13243]: Channel channel0 is being created for UST with buffer 1 and id 0 (in channel_ust_create() at channel.c:348) DEBUG2 - 08:57:45.740728 [13186/13243]: UST app adding channel channel0 to UST domain for session id 5 (in ust_app_create_channel_glb() at ust-app.c:3555) DEBUG2 - 08:57:45.740794 [13186/13243]: Channel channel0 created successfully (in channel_ust_create() at channel.c:383) DEBUG2 - 08:57:45.740852 [13186/13243]: Trace UST channel channel0 found by name (in trace_ust_find_channel_by_name() at trace-ust.c:157) DEBUG2 - 08:57:45.740906 [13186/13243]: Trace UST event * NOT found (in trace_ust_find_event() at trace-ust.c:198) DEBUG2 - 08:57:45.740961 [13186/13243]: Trace UST event *, loglevel (0,-1) created (in trace_ust_create_event() at trace-ust.c:433) DEBUG1 - 08:57:45.741011 [13186/13243]: UST app creating event * for all apps for session id 5 (in ust_app_create_event_glb() at ust-app.c:3706) DEBUG1 - 08:57:45.741070 [13186/13243]: Event UST * created in channel channel0 (in event_ust_enable_tracepoint() at event.c:472) DEBUG1 - 08:57:45.741128 [13186/13243]: Sending response (size: 16, retcode: Success) (in thread_manage_clients() at main.c:4155) DEBUG1 - 08:57:45.741257 [13186/13243]: Clean command context structure (in clean_command_ctx() at main.c:739) DEBUG1 - 08:57:45.741314 [13186/13243]: Accepting client command ... (in thread_manage_clients() at main.c:4019) DEBUG3 - 08:57:45.741659 [13186/13241]: [ht-thread] Polling on 2 fds. (in thread_ht_cleanup() at ht-cleanup.c:64)
lttng add-context -u -t perf:thread:cycles
DEBUG1 - 08:57:54.629061 [13186/13243]: Wait for client response (in thread_manage_clients() at main.c:4061) DEBUG1 - 08:57:54.633314 [13186/13243]: Receiving data from client ... (in thread_manage_clients() at main.c:4106) DEBUG1 - 08:57:54.649128 [13186/13243]: Nothing recv() from client... continuing (in thread_manage_clients() at main.c:4110) DEBUG1 - 08:57:54.653703 [13186/13243]: Clean command context structure (in clean_command_ctx() at main.c:739) DEBUG1 - 08:57:54.654819 [13186/13243]: Accepting client command ... (in thread_manage_clients() at main.c:4019) DEBUG1 - 08:57:54.684376 [13186/13243]: Wait for client response (in thread_manage_clients() at main.c:4061) DEBUG1 - 08:57:54.687063 [13186/13243]: Receiving data from client ... (in thread_manage_clients() at main.c:4106) DEBUG1 - 08:57:54.700304 [13186/13243]: Processing client command 0 (in process_client_msg() at main.c:2779) DEBUG1 - 08:57:54.703358 [13186/13243]: Getting session auto-20090221-085733 by name (in process_client_msg() at main.c:2862) DEBUG2 - 08:57:54.704354 [13186/13243]: Trying to find session by name auto-20090221-085733 (in session_find_by_name() at session.c:169) DEBUG3 - 08:57:54.705913 [13186/13243]: Consumer socket created (fd: 41) and added to output (in consumer_create_socket() at consumer.c:301) DEBUG1 - 08:57:54.706842 [13186/13243]: Setting relayd for session auto-20090221-085733 (in cmd_setup_relayd() at cmd.c:756) DEBUG1 - 08:57:54.708661 [13186/13243]: Context UST 5 added to channel channel0 (in add_uctx_to_channel() at context.c:134) DEBUG1 - 08:57:54.709644 [13186/13243]: Sending response (size: 16, retcode: Success) (in thread_manage_clients() at main.c:4155) DEBUG1 - 08:57:54.711559 [13186/13243]: Clean command context structure (in clean_command_ctx() at main.c:739) DEBUG1 - 08:57:54.712524 [13186/13243]: Accepting client command ... (in thread_manage_clients() at main.c:4019)
Actions