Skip to content

Commit c5984a2

Browse files
committed
perf add cpuclock and annotate example
Signed-off-by: Barry Song <[email protected]>
1 parent 79b6b54 commit c5984a2

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

debug/perf-cpuclock/a.out

7.85 KB
Binary file not shown.

debug/perf-cpuclock/main.c

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
main()
2+
{
3+
volatile int i,j,k;
4+
while(1) {
5+
for(i=0;i<100000;i++);
6+
for(j=0;j<200000;j++);
7+
for(k=0;k<300000;k++);
8+
}
9+
}

debug/perf-cpuclock/readme

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
sudo perf record -e cpu-clock ./a.out
2+
sudo perf annotate

0 commit comments

Comments
 (0)