aboutsummaryrefslogtreecommitdiffstats
path: root/lib/runtime_tools
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2017-12-19 12:05:30 +0100
committerDan Gudmundsson <[email protected]>2017-12-19 12:05:30 +0100
commit03c3bde623fdcb6e9ef4d390cc50fc812cb156d9 (patch)
treeb443283e28788421bf079702102eb60ebf7d51b6 /lib/runtime_tools
parent135317d5587af9e8479bfcc6e767913fc4f7a6de (diff)
parent7067db6e361e8f2feadd76dd6df66e5c6c4f8a0e (diff)
downloadotp-03c3bde623fdcb6e9ef4d390cc50fc812cb156d9.tar.gz
otp-03c3bde623fdcb6e9ef4d390cc50fc812cb156d9.tar.bz2
otp-03c3bde623fdcb6e9ef4d390cc50fc812cb156d9.zip
Merge branch 'dgud/kernel/refc_sched_wall_time/OTP-11694'
* dgud/kernel/refc_sched_wall_time/OTP-11694: test: spawn scheduler_wall_time flag holder Turn on scheduler_wall_time in an alive process Redirect system_flag(scheduler_wall_time,_) to kernel_refc kernel: add a resource reference counter
Diffstat (limited to 'lib/runtime_tools')
-rw-r--r--lib/runtime_tools/src/observer_backend.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/runtime_tools/src/observer_backend.erl b/lib/runtime_tools/src/observer_backend.erl
index 1b075a507d..a1edde8516 100644
--- a/lib/runtime_tools/src/observer_backend.erl
+++ b/lib/runtime_tools/src/observer_backend.erl
@@ -293,7 +293,7 @@ fetch_stats_loop(Parent, Time) ->
erlang:system_flag(scheduler_wall_time, true),
receive
_Msg ->
- %% erlang:system_flag(scheduler_wall_time, false)
+ erlang:system_flag(scheduler_wall_time, false),
ok
after Time ->
_M = Parent ! {stats, 1,
@@ -340,7 +340,6 @@ etop_collect(Collector) ->
case SchedulerWallTime of
undefined ->
- erlang:system_flag(scheduler_wall_time,true),
spawn(fun() -> flag_holder_proc(Collector) end),
ok;
_ ->
@@ -348,10 +347,11 @@ etop_collect(Collector) ->
end.
flag_holder_proc(Collector) ->
+ erlang:system_flag(scheduler_wall_time,true),
Ref = erlang:monitor(process,Collector),
receive
{'DOWN',Ref,_,_,_} ->
- %% erlang:system_flag(scheduler_wall_time,false)
+ erlang:system_flag(scheduler_wall_time,false),
ok
end.