aboutsummaryrefslogtreecommitdiffstats
path: root/lib/runtime_tools
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2016-12-20 09:35:04 +0100
committerSiri Hansen <[email protected]>2016-12-20 09:35:04 +0100
commit5ec809d53049d956869f9c17e1eef207c4cc1ed4 (patch)
treec5eb92bfb5890277e5bf6d4f2a1d5f800514bf6a /lib/runtime_tools
parent01c893ba18d524cd4868533b79ae2dd8bc395e7e (diff)
parent40e5a09362042adfccc5964bde48a2dce27373fd (diff)
downloadotp-5ec809d53049d956869f9c17e1eef207c4cc1ed4.tar.gz
otp-5ec809d53049d956869f9c17e1eef207c4cc1ed4.tar.bz2
otp-5ec809d53049d956869f9c17e1eef207c4cc1ed4.zip
Merge branch 'siri/etop/cpu-per-interval/OTP-14090' into maint
* siri/etop/cpu-per-interval/OTP-14090: [etop] Show CPU utilization for last interval only
Diffstat (limited to 'lib/runtime_tools')
-rw-r--r--lib/runtime_tools/src/observer_backend.erl7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/runtime_tools/src/observer_backend.erl b/lib/runtime_tools/src/observer_backend.erl
index e943fb4a3e..b27bc63d15 100644
--- a/lib/runtime_tools/src/observer_backend.erl
+++ b/lib/runtime_tools/src/observer_backend.erl
@@ -314,13 +314,12 @@ etop_collect(Collector) ->
case SchedulerWallTime of
undefined ->
- spawn(fun() -> flag_holder_proc(Collector) end),
+ erlang:system_flag(scheduler_wall_time,true),
+ spawn(fun() -> flag_holder_proc(Collector) end),
ok;
_ ->
ok
- end,
-
- erlang:system_flag(scheduler_wall_time,true).
+ end.
flag_holder_proc(Collector) ->
Ref = erlang:monitor(process,Collector),