feat:Added handling for syscall events#29
Closed
a-poljakow wants to merge 1 commit intosiemens:mainfrom
Closed
Conversation
fmoessbauer
reviewed
Mar 9, 2026
src/bt-ftrace-source.c
Outdated
| } | ||
| free(fields); | ||
|
|
||
| if(event_system_is("syscalls", event)) { |
Member
There was a problem hiding this comment.
Why only on the syscalls event? Is there a reason to not add it to all events?
fmoessbauer
reviewed
Mar 9, 2026
src/bt-ftrace-lttng-events.c
Outdated
| static const char *lttng_field_name_replace_common_pid_with_tid(const char *field_name) | ||
| { | ||
| static char outbuf[64]; | ||
| const char from[] = "common_pid"; |
Member
There was a problem hiding this comment.
There is only one common_pid field that needs to be replaced. By that, the code can simply strncmp against common_pid and return tid when matching.
fmoessbauer
reviewed
Mar 9, 2026
| const char *event_syscall_prefix_name(const char *prefix, const struct tep_event *event) | ||
| { | ||
| static char outbuf[64]; | ||
| const char *event_name= event->name + 4; |
Member
There was a problem hiding this comment.
We should check if the strlen(event->name) > 4.
fmoessbauer
requested changes
Mar 9, 2026
|
|
||
| } else if (bt_field_class_type_is(data_class_type, | ||
| BT_FIELD_CLASS_TYPE_SIGNED_INTEGER)) { | ||
| int64_t typed_val = convert_to_signed( |
Member
There was a problem hiding this comment.
Something is wrong with the type conversion. The following script triggers a babeltrace assertion:
sudo trace-cmd record -C mono -e 'syscalls:sys_enter_futex' sleep 1
babeltrace2 trace.dat
03-09 11:11:23.475 295635 295635 F LIB/ASSERT-COND bt_lib_assert_cond_failed@lib/assert-cond.c:63 Babeltrace 2 library precondition not satisfied.
03-09 11:11:23.475 295635 295635 F LIB/ASSERT-COND bt_lib_assert_cond_failed@lib/assert-cond.c:65 ------------------------------------------------------------------------
03-09 11:11:23.475 295635 295635 F LIB/ASSERT-COND bt_lib_assert_cond_failed@lib/assert-cond.c:66 Condition ID: `pre:field-integer-signed-get-value:is-field-set:field`.
03-09 11:11:23.475 295635 295635 F LIB/ASSERT-COND bt_lib_assert_cond_failed@lib/assert-cond.c:68 Function: bt_field_integer_signed_get_value().
03-09 11:11:23.475 295635 295635 F LIB/ASSERT-COND bt_lib_assert_cond_failed@lib/assert-cond.c:69 ------------------------------------------------------------------------
03-09 11:11:23.475 295635 295635 F LIB/ASSERT-COND bt_lib_assert_cond_failed@lib/assert-cond.c:70 Error is:
03-09 11:11:23.475 295635 295635 F LIB/ASSERT-COND bt_lib_assert_cond_failed@lib/assert-cond.c:72 Field is not set: addr=0x563ad3f0b730, is-set=0, is-frozen=0, class-addr=0x563ad3eb9970, class-type=SIGNED_INTEGER
03-09 11:11:23.476 295635 295635 F LIB/ASSERT-COND bt_lib_assert_cond_failed@lib/assert-cond.c:75 Aborting...Signed-off-by: Andre Poljakow <a.poljakow@siemens.com>
e6b7c2d to
0c155d0
Compare
Member
|
Integrated into #30 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added handling of the the prefix of syscall events
Also added the tid to the event fields from the common fields
Fixes #28