diff options
author | Lukas Larsson <[email protected]> | 2016-04-15 15:10:55 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2016-04-15 15:10:55 +0200 |
commit | be7f01689e71cbc1896ea5c11fb0ebc6f7f6dd8a (patch) | |
tree | e7db1292fe6aa167408b7a7c93289fe2cca7e5c1 /lib/tools/src/fprof.erl | |
parent | 67df3b3792857a2b4885c0acbeaa7f32f3594b0c (diff) | |
parent | cff38617986001e0a5f3f48de20acbeccceea978 (diff) | |
download | otp-be7f01689e71cbc1896ea5c11fb0ebc6f7f6dd8a.tar.gz otp-be7f01689e71cbc1896ea5c11fb0ebc6f7f6dd8a.tar.bz2 otp-be7f01689e71cbc1896ea5c11fb0ebc6f7f6dd8a.zip |
Merge branch 'lukas/erts/tracer-module-and-more/PR-1009/OTP-10268'
* lukas/erts/tracer-module-and-more/PR-1009/OTP-10268: (26 commits)
erts: Don't trace on link events when port is dead
erts: more logging in trace_bif_SUITE trace_bif_return
erts: Make trace_delivered go via sys msg dispatcher again
erts: Add comment about future trace optimizations
erts: Optimize tracer reload test
erts: Document erlang:match_spec_test/3
runtime_tools: Make dbg work with erl_tracer modules
runtime_rools: Allow new timestamp trace flags
runtime_tools: Lots of dbg docs updates
erts: Deallocate heap fragments from trace nif calls
eprof: Fix tests after tracer module incompatabilities
fprof: update to work with new spawned trace event
erts: Add 'spawned' trace event to 'procs' trace flag
erts: send and receive no longer need status lock
erts: Do 'unregister' as "self-tracing"
erts: Silence harmless valgrind warning in dec_term
erts: Fix end_per_testcase crash in local_trace_SUITE
observer: Update ttb to work with tracing on ports
runtime_tools: Update dbg to work with tracing on ports
erts: Add tracing examples in match spec docs
...
Diffstat (limited to 'lib/tools/src/fprof.erl')
-rw-r--r-- | lib/tools/src/fprof.erl | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/tools/src/fprof.erl b/lib/tools/src/fprof.erl index c5c24c8eb3..f9da748fef 100644 --- a/lib/tools/src/fprof.erl +++ b/lib/tools/src/fprof.erl @@ -1567,13 +1567,20 @@ trace_handler({trace_ts, Pid, return_to, {_M, _F, Args} = MFArgs, TS} = Trace, trace_return_to(Table, Pid, Func, TS), TS; %% -%% spawn +%% spawn, only needed (and reliable) prior to 19.0 trace_handler({trace_ts, Pid, spawn, Child, MFArgs, TS} = Trace, Table, _, Dump) -> dump_stack(Dump, get(Pid), Trace), trace_spawn(Table, Child, MFArgs, TS, Pid), TS; %% +%% spawned, added in 19.0 +trace_handler({trace_ts, Pid, spawned, Parent, MFArgs, TS} = Trace, + Table, _, Dump) -> + dump_stack(Dump, get(Pid), Trace), + trace_spawn(Table, Pid, MFArgs, TS, Parent), + TS; +%% %% exit trace_handler({trace_ts, Pid, exit, _Reason, TS} = Trace, Table, _, Dump) -> @@ -2014,8 +2021,10 @@ trace_spawn(Table, Pid, MFArgs, TS, Parent) -> ets:insert(Table, #proc{id = Pid, parent = Parent, spawned_as = MFArgs}); _ -> - throw({inconsistent_trace_data, ?MODULE, ?LINE, - [Pid, MFArgs, TS, Parent, Stack]}) + %% In 19.0 we get both a spawn and spawned event, + %% however we do not know the order so we just ignore + %% the second event that comes + ok end. |