Lines Matching +full:sleep +full:- +full:map
1 libperf-sampling(7)
5 ----
6 libperf-sampling - sampling interface
10 -----------
20 --
21 $ gcc -o sampling sampling.c -lperf
32 --
39 - creates events
40 - adds them to the event list
41 - opens and enables events through the event list
42 - sleeps for 3 seconds
43 - disables events
44 - reads and displays recorded samples
45 - destroys the event list
50 --
61 --
69 --
78 --
83 --
92 --
94 Next step is to prepare CPUs map.
99 --
103 45 return -1;
105 --
110 --
116 --
121 --
129 --
131 Configure event list with the cpus map and open event:
134 --
142 --
147 --
153 --
160 We will sleep for 3 seconds while the ring buffers get data from all CPUs, then we disable the even…
163 --
165 77 sleep(3);
167 --
172 --
173 80 perf_evlist__for_each_mmap(evlist, map, false) {
174 81 if (perf_mmap__read_init(map) < 0)
177 84 while ((event = perf_mmap__read_event(map)) != NULL) {
181 108 perf_mmap__consume(map);
183 110 perf_mmap__read_done(map);
186 --
191 --
196 89 array = event->sample.array;
214 --
218 We close the whole events list (both events) and remove it together with the threads map:
221 --
228 --
231 --------------
232 Report bugs to <linux-perf-users@vger.kernel.org>.
235 -------
239 ---------
243 --------
244 libperf(3), libperf-counting(7)