Lines Matching full:events
10 The counting interface provides API to measure and get count for specific perf events.
29 The `counting.c` example monitors two events on the current process and displays
32 * creates events
34 * opens and enables events through the event list
36 * disables events
73 Once the setup is complete we start by defining specific events using the `struct perf_event_attr`.
75 We create software events for cpu and task:
110 Now we create libperf's event list, which will serve as holder for the events we want:
121 We create libperf's events for the attributes we defined earlier and add them to the list:
142 Configure event list with the thread map and open events:
155 Both events are created as disabled (note the `disabled = 1` assignment above),
156 so we need to enable the whole list explicitly (both events).
158 From this moment events are counting and we can do our workload.
160 When we are done we disable the events list.
171 Now we need to get the counts from events, following code iterates through the
172 events list and read counts:
185 We close the whole events list (both events) and remove it together with the threads map: