aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/ops.tab
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2014-09-11 18:26:26 +0200
committerLukas Larsson <[email protected]>2016-02-02 10:45:21 +0100
commiteea5f896780e07f7ca76685061d01e7be5a7abaa (patch)
tree7d4a852b20f2075637457052844865e1c56b1e21 /erts/emulator/beam/ops.tab
parentd76ee58c07f32dfc0652844ec2b513af2105ffa1 (diff)
downloadotp-eea5f896780e07f7ca76685061d01e7be5a7abaa.tar.gz
otp-eea5f896780e07f7ca76685061d01e7be5a7abaa.tar.bz2
otp-eea5f896780e07f7ca76685061d01e7be5a7abaa.zip
erts, kernel: Add os:perf_counter function
The perf_counter is a very very cheap and high resolution timer that can be used to timestamp system events. It does not have monoticity guarantees, but should on most OS's expose a monotonous time. A special instruction has been created for this counter to further speed up fetching it. OTP-12908
Diffstat (limited to 'erts/emulator/beam/ops.tab')
-rw-r--r--erts/emulator/beam/ops.tab9
1 files changed, 9 insertions, 0 deletions
diff --git a/erts/emulator/beam/ops.tab b/erts/emulator/beam/ops.tab
index 081c4108a0..9e53b4bfcc 100644
--- a/erts/emulator/beam/ops.tab
+++ b/erts/emulator/beam/ops.tab
@@ -988,6 +988,13 @@ move Discarded x==0 | move Something x==0 => move Something x=0
%endif
+call_ext u==0 u$func:os:perf_counter/0 => \
+ i_perf_counter
+call_ext_last u==0 u$func:os:perf_counter/0 D => \
+ i_perf_counter | deallocate_return D
+call_ext_only u==0 u$func:os:perf_counter/0 => \
+ i_perf_counter | return
+
#
# The general case for BIFs that have no special instructions.
# A BIF used in the tail must be followed by a return instruction.
@@ -1027,6 +1034,8 @@ i_apply_fun_only
i_hibernate
+i_perf_counter
+
call_bif e
#