parse-events.c (bdef3b02ceeb97f5f67fcfa6dff13c4e70b34fb7) parse-events.c (f92128193094c288bc315db1694fafeaeb7ee1d0)
1#include "../../../include/linux/hw_breakpoint.h"
2#include "util.h"
3#include "../perf.h"
4#include "parse-options.h"
5#include "parse-events.h"
6#include "exec_cmd.h"
7#include "string.h"
8#include "symbol.h"

--- 408 unchanged lines hidden (view full) ---

417 char id_buf[4];
418 u64 id;
419 int fd;
420
421 attr->sample_type |= PERF_SAMPLE_RAW;
422 attr->sample_type |= PERF_SAMPLE_TIME;
423 attr->sample_type |= PERF_SAMPLE_CPU;
424
1#include "../../../include/linux/hw_breakpoint.h"
2#include "util.h"
3#include "../perf.h"
4#include "parse-options.h"
5#include "parse-events.h"
6#include "exec_cmd.h"
7#include "string.h"
8#include "symbol.h"

--- 408 unchanged lines hidden (view full) ---

417 char id_buf[4];
418 u64 id;
419 int fd;
420
421 attr->sample_type |= PERF_SAMPLE_RAW;
422 attr->sample_type |= PERF_SAMPLE_TIME;
423 attr->sample_type |= PERF_SAMPLE_CPU;
424
425 attr->sample_period = 1;
426
425 snprintf(evt_path, MAXPATHLEN, "%s/%s/%s/id", debugfs_path,
426 sys_name, evt_name);
427
428 fd = open(evt_path, O_RDONLY);
429 if (fd < 0)
430 return EVT_FAILED;
431
432 if (read(fd, id_buf, sizeof(id_buf)) < 0) {

--- 515 unchanged lines hidden ---
427 snprintf(evt_path, MAXPATHLEN, "%s/%s/%s/id", debugfs_path,
428 sys_name, evt_name);
429
430 fd = open(evt_path, O_RDONLY);
431 if (fd < 0)
432 return EVT_FAILED;
433
434 if (read(fd, id_buf, sizeof(id_buf)) < 0) {

--- 515 unchanged lines hidden ---