aboutsummaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorMikael Pettersson <[email protected]>2010-08-26 00:25:23 +0200
committerBjörn Gustavsson <[email protected]>2010-08-27 11:59:42 +0200
commit789f9502eeb097d558c23750c534b807d965541d (patch)
tree9630fb759a1690354cc3a57d76b5a9d6bba39c49 /make
parent980773b6f40133feff45b0ad9e811174b85034d9 (diff)
downloadotp-789f9502eeb097d558c23750c534b807d965541d.tar.gz
otp-789f9502eeb097d558c23750c534b807d965541d.tar.bz2
otp-789f9502eeb097d558c23750c534b807d965541d.zip
robustify hipe_bifs:get_hrvtime/0
The HiPE runtime system has a hipe_bifs:get_hrvtime/0 BIF which mimics the non-standard gethrvtime() C API. It's possible to configure the implementation to use the "perfctr" Linux kernel extension for performance-monitoring counters, in which case get_hrvtime has very high precision and low overhead. Otherwise it uses the same code as runtime(statistics). This patch changes the get_hrvtime implementation to do a runtime check to see if perfctr is available, and to use the fallback code rather than returning a dummy value if perfctr is unavailable, which is common. The current dummy value return is a bug. It messes up the API and either breaks callers (they get badarg when trying to compute on the value) or forces them to implement checks and fallbacks themselves. Timing code in HiPE's test suites and benchmarks is known to be affected.
Diffstat (limited to 'make')
0 files changed, 0 insertions, 0 deletions