repo.or.cz
/
linux
/
fpc-iii.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Linux 4.1.18
[linux/fpc-iii.git]
/
tools
/
perf
/
perf-read-vdso.c
blob
764e2547c25abf0c6e0fa7979b3e1c32bfdc99b9
1
#include <stdio.h>
2
#include <string.h>
3
4
#define VDSO__MAP_NAME
"[vdso]"
5
6
/*
7
* Include definition of find_vdso_map() also used in util/vdso.c for
8
* building perf.
9
*/
10
#include
"util/find-vdso-map.c"
11
12
int
main
(
void
)
13
{
14
void
*
start
, *
end
;
15
size_t
size
,
written
;
16
17
if
(
find_vdso_map
(&
start
, &
end
))
18
return
1
;
19
20
size
=
end
-
start
;
21
22
while
(
size
) {
23
written
=
fwrite
(
start
,
1
,
size
,
stdout
);
24
if
(!
written
)
25
return
1
;
26
start
+=
written
;
27
size
-=
written
;
28
}
29
30
if
(
fflush
(
stdout
))
31
return
1
;
32
33
return
0
;
34
}