|
@@ -49,6 +49,7 @@ static int pipe_output = 0;
|
|
static const char *output_name = "perf.data";
|
|
static const char *output_name = "perf.data";
|
|
static int group = 0;
|
|
static int group = 0;
|
|
static int realtime_prio = 0;
|
|
static int realtime_prio = 0;
|
|
|
|
+static bool nodelay = false;
|
|
static bool raw_samples = false;
|
|
static bool raw_samples = false;
|
|
static bool sample_id_all_avail = true;
|
|
static bool sample_id_all_avail = true;
|
|
static bool system_wide = false;
|
|
static bool system_wide = false;
|
|
@@ -307,6 +308,11 @@ static void create_counter(struct perf_evsel *evsel, int cpu)
|
|
attr->sample_type |= PERF_SAMPLE_CPU;
|
|
attr->sample_type |= PERF_SAMPLE_CPU;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (nodelay) {
|
|
|
|
+ attr->watermark = 0;
|
|
|
|
+ attr->wakeup_events = 1;
|
|
|
|
+ }
|
|
|
|
+
|
|
attr->mmap = track;
|
|
attr->mmap = track;
|
|
attr->comm = track;
|
|
attr->comm = track;
|
|
attr->inherit = !no_inherit;
|
|
attr->inherit = !no_inherit;
|
|
@@ -331,9 +337,6 @@ try_again:
|
|
else if (err == ENODEV && cpu_list) {
|
|
else if (err == ENODEV && cpu_list) {
|
|
die("No such device - did you specify"
|
|
die("No such device - did you specify"
|
|
" an out-of-range profile CPU?\n");
|
|
" an out-of-range profile CPU?\n");
|
|
- } else if (err == ENOENT) {
|
|
|
|
- die("%s event is not supported. ",
|
|
|
|
- event_name(evsel));
|
|
|
|
} else if (err == EINVAL && sample_id_all_avail) {
|
|
} else if (err == EINVAL && sample_id_all_avail) {
|
|
/*
|
|
/*
|
|
* Old kernel, no attr->sample_id_type_all field
|
|
* Old kernel, no attr->sample_id_type_all field
|
|
@@ -480,6 +483,7 @@ static void atexit_header(void)
|
|
process_buildids();
|
|
process_buildids();
|
|
perf_header__write(&session->header, output, true);
|
|
perf_header__write(&session->header, output, true);
|
|
perf_session__delete(session);
|
|
perf_session__delete(session);
|
|
|
|
+ perf_evsel_list__delete();
|
|
symbol__exit();
|
|
symbol__exit();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -845,6 +849,8 @@ const struct option record_options[] = {
|
|
"record events on existing thread id"),
|
|
"record events on existing thread id"),
|
|
OPT_INTEGER('r', "realtime", &realtime_prio,
|
|
OPT_INTEGER('r', "realtime", &realtime_prio,
|
|
"collect data with this RT SCHED_FIFO priority"),
|
|
"collect data with this RT SCHED_FIFO priority"),
|
|
|
|
+ OPT_BOOLEAN('D', "no-delay", &nodelay,
|
|
|
|
+ "collect data without buffering"),
|
|
OPT_BOOLEAN('R', "raw-samples", &raw_samples,
|
|
OPT_BOOLEAN('R', "raw-samples", &raw_samples,
|
|
"collect raw sample records from all opened counters"),
|
|
"collect raw sample records from all opened counters"),
|
|
OPT_BOOLEAN('a', "all-cpus", &system_wide,
|
|
OPT_BOOLEAN('a', "all-cpus", &system_wide,
|