-
Notifications
You must be signed in to change notification settings - Fork 7
/
README
36 lines (24 loc) · 1.12 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
rdtscbench measures small and large operations using clock cycles as
time measurement unit. It uses RDTSC x86 instruction to get clock
cycles from CPU registers
rdtscbench is free software licensed under the GPL v2.
Peter Senna Tschudin - [email protected]
IMPORTANT: Before running make and rdtscbench disable CPU dynamic clock.
On Linux: # service cpuspeed stop
IMPORTANT 2: If the computer hybernates during the measurement, it may
break the measurement.
The Makefile runs gethz.sh to cat /proc/cpuinfo looking for the CPU speed.
The result is saved in hzdef.h. See example:
$ cat /proc/cpuinfo |grep MHz
cpu MHz : 2701.000
gethz.sh converts 2701.000 to 2701000000LL and saves it at hzdef.h
folders:
buf - C code optimization tests
getpid - Very simple example of how to use rdtscbench
matrix - Measuring C code optimization - http://goo.gl/Pcilt
moreExamples - Measuring: gettimeofday(), simplemath[], sysconf(),
malloc ( 1000000 * sizeof ( char ) ),
malloc ( 1000000000 * sizeof ( char ) ),
Process Communication over pipes;
rdtscbench - The source code of rdtscbench
stacko - C code optimization tests