aboutsummaryrefslogtreecommitdiff
path: root/scripts/tracetool/backend
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2017-07-28 14:36:57 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2017-08-01 10:36:30 +0100
commitea1ff54f7d2d7ac32be3c54bd171481bc2354721 (patch)
treeea09755f2e4e1e255072b080409b9c044ce7aaf1 /scripts/tracetool/backend
parented8650586fed350e46a39d39eacec02a7f7ecc08 (diff)
trace: ensure unique function / variable names per .stp file
The simpletrace compatibility code for systemtap creates a function and some global variables for mapping to event ID numbers. We generate multiple -simpletrace.stp files though, one per target and systemtap considers functions & variables to be globally scoped, not per file. So if trying to use the simpletrace compat probes, systemtap will complain: # stap -e 'probe qemu.system.arm.simpletrace.visit_type_str { print( "hello")}' semantic error: conflicting global variables: identifier 'event_name_to_id_map' at /usr/share/systemtap/tapset/qemu-aarch64-simpletrace.stp:3:8 source: global event_name_to_id_map ^ identifier 'event_name_to_id_map' at /usr/share/systemtap/tapset/qemu-system-arm-simpletrace.stp:3:8 source: global event_name_to_id_map ^ WARNING: cross-file global variable reference to identifier 'event_name_to_id_map' at /usr/share/systemtap/tapset/qemu-system-arm-simpletrace.stp:3:8 from: identifier 'event_name_to_id_map' at /usr/share/systemtap/tapset/qemu-aarch64-simpletrace.stp:8:21 source: if (!([name] in event_name_to_id_map)) { ^ WARNING: cross-file global variable reference to identifier 'event_next_id' at /usr/share/systemtap/tapset/qemu-system-arm-simpletrace.stp:4:8 from: identifier 'event_next_id' at :9:38 source: event_name_to_id_map[name] = event_next_id ^ We already have a string used to prefix probe names, so just replace '.' with '_' to get a function / variable name prefix Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 20170728133657.5525-1-berrange@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'scripts/tracetool/backend')
0 files changed, 0 insertions, 0 deletions