test: perf: prevent overflow counter from stopping counter
Fixes: 1a204b6 "perf: overflow test"
Change-Id: I4d8e93b97f7a8d58ef7811f55b5c995b16c5af69
This commit is contained in:
@@ -164,9 +164,12 @@ static void build_perf_event_ioc_reset(struct command *cmd)
|
||||
}
|
||||
|
||||
// perf_event_ioc_refresh command
|
||||
static int perf_event_ioc_refresh(int fd, void *_args)
|
||||
int perf_event_ioc_refresh(int fd, void *_args)
|
||||
{
|
||||
int ret = asm_ioctl3(fd, PERF_EVENT_IOC_REFRESH, 0);
|
||||
/* Prevent overflow counter from stopping counter
|
||||
* Note that it starts counter as well
|
||||
*/
|
||||
int ret = asm_ioctl3(fd, PERF_EVENT_IOC_REFRESH, 256);
|
||||
|
||||
if (ret < 0) {
|
||||
errno = -ret;
|
||||
|
||||
Reference in New Issue
Block a user