aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/perf/Documentation/perf-record.txt3
-rw-r--r--tools/perf/builtin-record.c8
-rw-r--r--tools/perf/builtin-sched.c18
3 files changed, 20 insertions, 9 deletions
diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt
index 52462ae26455..e032716c839b 100644
--- a/tools/perf/Documentation/perf-record.txt
+++ b/tools/perf/Documentation/perf-record.txt
@@ -61,6 +61,9 @@ OPTIONS
61-r:: 61-r::
62--realtime=:: 62--realtime=::
63 Collect data with this RT SCHED_FIFO priority. 63 Collect data with this RT SCHED_FIFO priority.
64-D::
65--no-delay::
66 Collect data without buffering.
64-A:: 67-A::
65--append:: 68--append::
66 Append to the output file to do incremental profiling. 69 Append to the output file to do incremental profiling.
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 1210e6484ad5..df6064ad9bf2 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -49,6 +49,7 @@ static int pipe_output = 0;
49static const char *output_name = "perf.data"; 49static const char *output_name = "perf.data";
50static int group = 0; 50static int group = 0;
51static int realtime_prio = 0; 51static int realtime_prio = 0;
52static bool nodelay = false;
52static bool raw_samples = false; 53static bool raw_samples = false;
53static bool sample_id_all_avail = true; 54static bool sample_id_all_avail = true;
54static bool system_wide = false; 55static bool system_wide = false;
@@ -307,6 +308,11 @@ static void create_counter(struct perf_evsel *evsel, int cpu)
307 attr->sample_type |= PERF_SAMPLE_CPU; 308 attr->sample_type |= PERF_SAMPLE_CPU;
308 } 309 }
309 310
311 if (nodelay) {
312 attr->watermark = 0;
313 attr->wakeup_events = 1;
314 }
315
310 attr->mmap = track; 316 attr->mmap = track;
311 attr->comm = track; 317 attr->comm = track;
312 attr->inherit = !no_inherit; 318 attr->inherit = !no_inherit;
@@ -843,6 +849,8 @@ const struct option record_options[] = {
843 "record events on existing thread id"), 849 "record events on existing thread id"),
844 OPT_INTEGER('r', "realtime", &realtime_prio, 850 OPT_INTEGER('r', "realtime", &realtime_prio,
845 "collect data with this RT SCHED_FIFO priority"), 851 "collect data with this RT SCHED_FIFO priority"),
852 OPT_BOOLEAN('D', "no-delay", &nodelay,
853 "collect data without buffering"),
846 OPT_BOOLEAN('R', "raw-samples", &raw_samples, 854 OPT_BOOLEAN('R', "raw-samples", &raw_samples,
847 "collect raw sample records from all opened counters"), 855 "collect raw sample records from all opened counters"),
848 OPT_BOOLEAN('a', "all-cpus", &system_wide, 856 OPT_BOOLEAN('a', "all-cpus", &system_wide,
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index abd4b8497bc4..29e7ffd85690 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -1843,15 +1843,15 @@ static const char *record_args[] = {
1843 "-f", 1843 "-f",
1844 "-m", "1024", 1844 "-m", "1024",
1845 "-c", "1", 1845 "-c", "1",
1846 "-e", "sched:sched_switch:r", 1846 "-e", "sched:sched_switch",
1847 "-e", "sched:sched_stat_wait:r", 1847 "-e", "sched:sched_stat_wait",
1848 "-e", "sched:sched_stat_sleep:r", 1848 "-e", "sched:sched_stat_sleep",
1849 "-e", "sched:sched_stat_iowait:r", 1849 "-e", "sched:sched_stat_iowait",
1850 "-e", "sched:sched_stat_runtime:r", 1850 "-e", "sched:sched_stat_runtime",
1851 "-e", "sched:sched_process_exit:r", 1851 "-e", "sched:sched_process_exit",
1852 "-e", "sched:sched_process_fork:r", 1852 "-e", "sched:sched_process_fork",
1853 "-e", "sched:sched_wakeup:r", 1853 "-e", "sched:sched_wakeup",
1854 "-e", "sched:sched_migrate_task:r", 1854 "-e", "sched:sched_migrate_task",
1855}; 1855};
1856 1856
1857static int __cmd_record(int argc, const char **argv) 1857static int __cmd_record(int argc, const char **argv)