diff options
author | Lukas Larsson <[email protected]> | 2018-05-15 16:32:26 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2018-05-15 16:36:48 +0200 |
commit | d5dc5584884488c8fcb5710997a14c2c418692f3 (patch) | |
tree | 1058b4ef8953d6b814d898b890873ae2627a16d3 /erts/emulator/beam/erl_bif_trace.c | |
parent | 3b3e2f46841e3e86c991be92d62cbb0360ca80e3 (diff) | |
download | otp-d5dc5584884488c8fcb5710997a14c2c418692f3.tar.gz otp-d5dc5584884488c8fcb5710997a14c2c418692f3.tar.bz2 otp-d5dc5584884488c8fcb5710997a14c2c418692f3.zip |
erts: Make cpu_timestamp use per thread on Linux
If we don't use per thread the value becomes completely
nonsensical on systems with more than one scheduler.
We keep the old solaris behaviour in order to support the
option, but it only really works when using a single
scheduler.
Diffstat (limited to 'erts/emulator/beam/erl_bif_trace.c')
-rw-r--r-- | erts/emulator/beam/erl_bif_trace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_bif_trace.c b/erts/emulator/beam/erl_bif_trace.c index 1953f79d79..fd3400ab71 100644 --- a/erts/emulator/beam/erl_bif_trace.c +++ b/erts/emulator/beam/erl_bif_trace.c @@ -643,12 +643,12 @@ Eterm erts_internal_trace_3(BIF_ALIST_3) SysTimespec tp; int i; - if (sys_get_proc_cputime(start, tp) < 0) + if (sys_get_cputime(start, tp) < 0) goto error; start = ((SysCpuTime)tp.tv_sec * 1000000000LL) + (SysCpuTime)tp.tv_nsec; for (i = 0; i < 100; i++) - sys_get_proc_cputime(stop, tp); + sys_get_cputime(stop, tp); stop = ((SysCpuTime)tp.tv_sec * 1000000000LL) + (SysCpuTime)tp.tv_nsec; if (start == 0) goto error; |