FAQ
http://codereview.appspot.com/6443115/diff/27013/src/pkg/runtime/runtime.c
File src/pkg/runtime/runtime.c (right):

http://codereview.appspot.com/6443115/diff/27013/src/pkg/runtime/runtime.c#newcode363
src/pkg/runtime/runtime.c:363:
runtime/pprof·runtime_cyclesPerSecond(int64 res)
On 2012/09/18 21:28:42, dvyukov wrote:
How about this?
won't work on ARM.
Linux/ARM doesn't allow user space access to the cycle counter.

so runtime.cputicks() on ARM actually returns a random number
(for seeding our hash map)
The more precise method would require either to examine CPUID output
(it's quite
tricky, works since Pentium4 and I am not sure about AMD). I have no
idea how to
do it on ARM. Or alternatively, OS-dependent method is to read it from system
registry on Windows, and I don't know about other OSes.
I think the best way is to get it from the OS.

http://codereview.appspot.com/6443115/

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedSep 19, '12 at 9:26a
activeSep 19, '12 at 9:26a
posts1
users1
websitegolang.org

1 user in discussion

Minux Ma: 1 post

People

Translate

site design / logo © 2022 Grokbase