Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 231498
b: refs/heads/master
c: 7c46d8d
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar committed Jan 15, 2011
1 parent b0f7939 commit b26cbc4
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7f85803a26f304e698c673838aab06cc6d4d6e59
refs/heads/master: 7c46d8da09df22361d1d43465c4f1b06cecaf25f
3 changes: 3 additions & 0 deletions trunk/tools/perf/Documentation/perf-record.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ OPTIONS
-r::
--realtime=::
Collect data with this RT SCHED_FIFO priority.
-D::
--no-delay::
Collect data without buffering.
-A::
--append::
Append to the output file to do incremental profiling.
Expand Down
8 changes: 8 additions & 0 deletions trunk/tools/perf/builtin-record.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ static int pipe_output = 0;
static const char *output_name = "perf.data";
static int group = 0;
static int realtime_prio = 0;
static bool nodelay = false;
static bool raw_samples = false;
static bool sample_id_all_avail = true;
static bool system_wide = false;
Expand Down Expand Up @@ -307,6 +308,11 @@ static void create_counter(struct perf_evsel *evsel, int cpu)
attr->sample_type |= PERF_SAMPLE_CPU;
}

if (nodelay) {
attr->watermark = 0;
attr->wakeup_events = 1;
}

attr->mmap = track;
attr->comm = track;
attr->inherit = !no_inherit;
Expand Down Expand Up @@ -843,6 +849,8 @@ const struct option record_options[] = {
"record events on existing thread id"),
OPT_INTEGER('r', "realtime", &realtime_prio,
"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,
"collect raw sample records from all opened counters"),
OPT_BOOLEAN('a', "all-cpus", &system_wide,
Expand Down
18 changes: 9 additions & 9 deletions trunk/tools/perf/builtin-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1843,15 +1843,15 @@ static const char *record_args[] = {
"-f",
"-m", "1024",
"-c", "1",
"-e", "sched:sched_switch:r",
"-e", "sched:sched_stat_wait:r",
"-e", "sched:sched_stat_sleep:r",
"-e", "sched:sched_stat_iowait:r",
"-e", "sched:sched_stat_runtime:r",
"-e", "sched:sched_process_exit:r",
"-e", "sched:sched_process_fork:r",
"-e", "sched:sched_wakeup:r",
"-e", "sched:sched_migrate_task:r",
"-e", "sched:sched_switch",
"-e", "sched:sched_stat_wait",
"-e", "sched:sched_stat_sleep",
"-e", "sched:sched_stat_iowait",
"-e", "sched:sched_stat_runtime",
"-e", "sched:sched_process_exit",
"-e", "sched:sched_process_fork",
"-e", "sched:sched_wakeup",
"-e", "sched:sched_migrate_task",
};

static int __cmd_record(int argc, const char **argv)
Expand Down

0 comments on commit b26cbc4

Please sign in to comment.