Skip to content

Commit

Permalink
Add subshell
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Applencourt committed Sep 8, 2023
1 parent 6d30d7a commit 5f6d869
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions xprof/xprof.sh.erb.in
Original file line number Diff line number Diff line change
Expand Up @@ -440,12 +440,13 @@ trace_and_summary() {
#Create the metadata.
#read and dump `$LTTNG_UST_THAPI_METADATA` env
run_iff_local_master $bindir/thapi_metadata
# Run the binary
trap 'trace_epilogue' EXIT SIGABRT SIGSEGV

preload_lib_tracers
#Preventing trace event record loss
LTTNG_UST_ALLOW_BLOCKING=1 "$@"
# Run the binary.
trap 'trace_epilogue' EXIT SIGABRT SIGSEGV
(
preload_lib_tracers
LTTNG_UST_ALLOW_BLOCKING=1 "$@"
)
}

call_babeltrace_thapi() {
Expand Down Expand Up @@ -539,17 +540,21 @@ trace_epilogue_live() {

trace_and_summary_live() {
[ "$#" -eq 0 ] && display_help

# Each node will have their own lock
run_iff_local_master setup_lttng --live
run_iff_local_master setup_babeltrace_live
local_barier setup

# Create the metadata.
# Read and dump `$LTTNG_UST_THAPI_METADATA` env
run_iff_local_master $bindir/thapi_metadata
# Run the binary
trap 'trace_epilogue_live' EXIT SIGABRT SIGSEGV
preload_lib_tracers
LTTNG_UST_ALLOW_BLOCKING=1 "$@"
(
preload_lib_tracers
LTTNG_UST_ALLOW_BLOCKING=1 "$@"
)
}


Expand Down

0 comments on commit 5f6d869

Please sign in to comment.