aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/doc/src/os.xml
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2016-02-02 17:17:46 +0100
committerLukas Larsson <[email protected]>2016-02-02 17:17:46 +0100
commit246927d866b7de938cc58c95498f54b03869cbe5 (patch)
tree63c4846a861aec6051b4f31aa1c5f5186802855a /lib/kernel/doc/src/os.xml
parentf45b817d0da8f9f61d2241d4f0eb06e47a6be86a (diff)
parentf12da3c4abe70bd932484895af6e23436b308f53 (diff)
downloadotp-246927d866b7de938cc58c95498f54b03869cbe5.tar.gz
otp-246927d866b7de938cc58c95498f54b03869cbe5.tar.bz2
otp-246927d866b7de938cc58c95498f54b03869cbe5.zip
Merge branch 'lukas/erts/msacc'
* lukas/erts/msacc: Update preloaded modules erts: Make msacc alloctor type thread safe Silence compiler erts: Fix msacc testcase on some windowses erts: Add power saving cpu feature tests and use them erts: Refactor perf counter internal interface erts: Add rdtscp instruction check erts: Fix hrtime for windows erts: use correct function for perf counter on non-x86 erts: Fix msacc win32 debug compile error erts: Add microstate accounting erts, kernel: Add os:perf_counter function erts: Add ERTS_WRITE_UNLIKELY
Diffstat (limited to 'lib/kernel/doc/src/os.xml')
-rw-r--r--lib/kernel/doc/src/os.xml25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/kernel/doc/src/os.xml b/lib/kernel/doc/src/os.xml
index 682d4a2eac..165160a909 100644
--- a/lib/kernel/doc/src/os.xml
+++ b/lib/kernel/doc/src/os.xml
@@ -37,6 +37,7 @@
use these functions can be of help in enabling a program to run on
most platforms.</p>
</description>
+
<funcs>
<func>
<name name="cmd" arity="1"/>
@@ -210,6 +211,30 @@ format_utc_timestamp() ->
</desc>
</func>
<func>
+ <name name="perf_counter" arity="0"/>
+ <fsummary>Returns a performance counter</fsummary>
+ <desc>
+ <p>Returns the current performance counter value in <c>perf_counter</c>
+ <seealso marker="erts:erlang#type_time_unit">time unit</seealso>.
+ This is a highly optimized call that might not be traceable.
+ </p>
+ </desc>
+ </func>
+ <func>
+ <name name="perf_counter" arity="1"/>
+ <fsummary>Returns a performance counter</fsummary>
+ <desc><p>Returns a performance counter that can be used as a very fast and
+ high resolution timestamp. This counter is read directly from the hardware or operating
+ system with the same guarantees. This means that two consecutive calls
+ to the function are not guaranteed to be monotonic, though it most likely will be.
+ The performance counter till be converted to the resolution passed as an argument.</p>
+ <pre>1> <input>T1 = os:perf_counter(1000),receive after 10000 -> ok end,T2 = os:perf_counter(1000).</input>
+176525861
+2> <input>T2 - T1.</input>
+10004</pre>
+ </desc>
+ </func>
+ <func>
<name name="type" arity="0"/>
<fsummary>Return the OS family and, in some cases, OS name of the current operating system</fsummary>
<desc>