git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
[pandora-kernel.git]
/
tools
/
perf
/
builtin-sched.c
diff --git
a/tools/perf/builtin-sched.c
b/tools/perf/builtin-sched.c
index
4f5a03e
..
55f3b5d
100644
(file)
--- a/
tools/perf/builtin-sched.c
+++ b/
tools/perf/builtin-sched.c
@@
-22,7
+22,7
@@
static char const *input_name = "perf.data";
static char default_sort_order[] = "avg, max, switch, runtime";
static char const *input_name = "perf.data";
static char default_sort_order[] = "avg, max, switch, runtime";
-static c
har
*sort_order = default_sort_order;
+static c
onst char
*sort_order = default_sort_order;
static int profile_cpu = -1;
static int profile_cpu = -1;
@@
-68,10
+68,10
@@
enum sched_event_type {
struct sched_atom {
enum sched_event_type type;
struct sched_atom {
enum sched_event_type type;
+ int specific_wait;
u64 timestamp;
u64 duration;
unsigned long nr;
u64 timestamp;
u64 duration;
unsigned long nr;
- int specific_wait;
sem_t *wait_sem;
struct task_desc *wakee;
};
sem_t *wait_sem;
struct task_desc *wakee;
};
@@
-105,7
+105,7
@@
static u64 sum_runtime;
static u64 sum_fluct;
static u64 run_avg;
static u64 sum_fluct;
static u64 run_avg;
-static unsigned
long
replay_repeat = 10;
+static unsigned
int
replay_repeat = 10;
static unsigned long nr_timestamps;
static unsigned long nr_unordered_timestamps;
static unsigned long nr_state_machine_bugs;
static unsigned long nr_timestamps;
static unsigned long nr_unordered_timestamps;
static unsigned long nr_state_machine_bugs;
@@
-1641,30
+1641,27
@@
static int process_sample_event(event_t *event, struct perf_session *session)
return 0;
}
return 0;
}
-static int process_lost_event(event_t *event __used,
- struct perf_session *session __used)
-{
- nr_lost_chunks++;
- nr_lost_events += event->lost.lost;
-
- return 0;
-}
-
static struct perf_event_ops event_ops = {
static struct perf_event_ops event_ops = {
- .sample = process_sample_event,
- .comm = event__process_comm,
- .lost = process_lost_event,
+ .sample = process_sample_event,
+ .comm = event__process_comm,
+ .lost = event__process_lost,
+ .fork = event__process_task,
+ .ordered_samples = true,
};
static int read_events(void)
{
int err = -EINVAL;
};
static int read_events(void)
{
int err = -EINVAL;
- struct perf_session *session = perf_session__new(input_name, O_RDONLY, 0);
+ struct perf_session *session = perf_session__new(input_name, O_RDONLY, 0
, false
);
if (session == NULL)
return -ENOMEM;
if (session == NULL)
return -ENOMEM;
- if (perf_session__has_traces(session, "record -R"))
+ if (perf_session__has_traces(session, "record -R"))
{
err = perf_session__process_events(session, &event_ops);
err = perf_session__process_events(session, &event_ops);
+ nr_events = session->hists.stats.nr_events[0];
+ nr_lost_events = session->hists.stats.total_lost;
+ nr_lost_chunks = session->hists.stats.nr_events[PERF_RECORD_LOST];
+ }
perf_session__delete(session);
return err;
perf_session__delete(session);
return err;
@@
-1790,7
+1787,7
@@
static const char * const sched_usage[] = {
static const struct option sched_options[] = {
OPT_STRING('i', "input", &input_name, "file",
"input file name"),
static const struct option sched_options[] = {
OPT_STRING('i', "input", &input_name, "file",
"input file name"),
- OPT_
BOOLEAN
('v', "verbose", &verbose,
+ OPT_
INCR
('v', "verbose", &verbose,
"be more verbose (show symbol address, etc)"),
OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace,
"dump raw trace in ASCII"),
"be more verbose (show symbol address, etc)"),
OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace,
"dump raw trace in ASCII"),
@@
-1805,7
+1802,7
@@
static const char * const latency_usage[] = {
static const struct option latency_options[] = {
OPT_STRING('s', "sort", &sort_order, "key[,key2...]",
"sort by key(s): runtime, switch, avg, max"),
static const struct option latency_options[] = {
OPT_STRING('s', "sort", &sort_order, "key[,key2...]",
"sort by key(s): runtime, switch, avg, max"),
- OPT_
BOOLEAN
('v', "verbose", &verbose,
+ OPT_
INCR
('v', "verbose", &verbose,
"be more verbose (show symbol address, etc)"),
OPT_INTEGER('C', "CPU", &profile_cpu,
"CPU to profile on"),
"be more verbose (show symbol address, etc)"),
OPT_INTEGER('C', "CPU", &profile_cpu,
"CPU to profile on"),
@@
-1820,9
+1817,9
@@
static const char * const replay_usage[] = {
};
static const struct option replay_options[] = {
};
static const struct option replay_options[] = {
- OPT_INTEGER('r', "repeat", &replay_repeat,
- "repeat the workload replay N times (-1: infinite)"),
- OPT_
BOOLEAN
('v', "verbose", &verbose,
+ OPT_
U
INTEGER('r', "repeat", &replay_repeat,
+
"repeat the workload replay N times (-1: infinite)"),
+ OPT_
INCR
('v', "verbose", &verbose,
"be more verbose (show symbol address, etc)"),
OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace,
"dump raw trace in ASCII"),
"be more verbose (show symbol address, etc)"),
OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace,
"dump raw trace in ASCII"),
@@
-1850,7
+1847,6
@@
static const char *record_args[] = {
"record",
"-a",
"-R",
"record",
"-a",
"-R",
- "-M",
"-f",
"-m", "1024",
"-c", "1",
"-f",
"-m", "1024",
"-c", "1",