diff options
author | Lukas Larsson <[email protected]> | 2015-07-16 11:27:00 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2016-02-02 10:45:22 +0100 |
commit | 0399f5fc547ef035c4eb5e383f30b28ae73d936e (patch) | |
tree | e4179769e6a09cc6de68f5226671fb403b5ef4e2 /erts/emulator/beam/erl_msacc.h | |
parent | dc1e3933e633d9d7527e6df044895d12d3845e14 (diff) | |
download | otp-0399f5fc547ef035c4eb5e383f30b28ae73d936e.tar.gz otp-0399f5fc547ef035c4eb5e383f30b28ae73d936e.tar.bz2 otp-0399f5fc547ef035c4eb5e383f30b28ae73d936e.zip |
erts: Refactor perf counter internal interface
perf counter is now part of the function pointer interface
and also the function returns the value instead of writing
to a memory buffer.
Diffstat (limited to 'erts/emulator/beam/erl_msacc.h')
-rw-r--r-- | erts/emulator/beam/erl_msacc.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/erts/emulator/beam/erl_msacc.h b/erts/emulator/beam/erl_msacc.h index 1b4b7a408a..284388f7aa 100644 --- a/erts/emulator/beam/erl_msacc.h +++ b/erts/emulator/beam/erl_msacc.h @@ -121,8 +121,8 @@ typedef struct erl_msacc_t_ ErtsMsAcc; struct erl_msacc_t_ { /* the the values below are protected by mtx iff unmanaged = 1 */ - ErtsSysHrTime perf_counter; - ErtsSysHrTime perf_counters[ERTS_MSACC_STATE_COUNT]; + ErtsSysPerfCounter perf_counter; + ErtsSysPerfCounter perf_counters[ERTS_MSACC_STATE_COUNT]; #ifdef ERTS_MSACC_STATE_COUNTERS Uint64 state_counters[ERTS_MSACC_STATE_COUNT]; #endif @@ -324,14 +324,14 @@ void erts_msacc_set_state_um__(ErtsMsAcc *msacc, Uint new_state, int increment) ERTS_MSACC_INLINE void erts_msacc_set_state_m__(ErtsMsAcc *msacc, Uint new_state, int increment) { - ErtsSysHrTime prev_perf_counter; + ErtsSysPerfCounter prev_perf_counter; Sint64 diff; if (new_state == msacc->state) return; prev_perf_counter = msacc->perf_counter; - sys_perf_counter(&msacc->perf_counter); + msacc->perf_counter = erts_sys_perf_counter(); diff = msacc->perf_counter - prev_perf_counter; ASSERT(diff >= 0); msacc->perf_counters[msacc->state] += diff; |