aboutsummaryrefslogtreecommitdiff
path: root/perf
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2010-08-16 13:44:51 -0400
committerArjan van de Ven <arjan@linux.intel.com>2010-08-16 13:44:51 -0400
commitd17a7eff393d84512688c99824272e82bb9b886f (patch)
tree17155b3ff378fe7f34a3ae0c5a874bc673c1c9e1 /perf
parentbb7f4505b69fff18488229fe8e09be903cb5e837 (diff)
downloadpowertop-d17a7eff393d84512688c99824272e82bb9b886f.tar.gz
if process A wakes up process B, blame the wakeup on process A, not on process B.
Diffstat (limited to 'perf')
-rw-r--r--perf/perf_bundle.cpp4
-rw-r--r--perf/perf_bundle.h2
-rw-r--r--perf/perf_event.h19
3 files changed, 22 insertions, 3 deletions
diff --git a/perf/perf_bundle.cpp b/perf/perf_bundle.cpp
index df3b684..78dee30 100644
--- a/perf/perf_bundle.cpp
+++ b/perf/perf_bundle.cpp
@@ -180,11 +180,11 @@ void perf_bundle::process(void)
continue;
- handle_trace_point(sample->trace.type, &sample->data, sample->trace.cpu, sample->trace.time);
+ handle_trace_point(sample->trace.type, &sample->data, sample->trace.cpu, sample->trace.time, sample->trace.flags);
}
}
-void perf_bundle::handle_trace_point(int type, void *trace, int cpu, uint64_t time)
+void perf_bundle::handle_trace_point(int type, void *trace, int cpu, uint64_t time, unsigned char flags)
{
}
diff --git a/perf/perf_bundle.h b/perf/perf_bundle.h
index 471f406..5ac8c2c 100644
--- a/perf/perf_bundle.h
+++ b/perf/perf_bundle.h
@@ -25,7 +25,7 @@ public:
void process(void);
- virtual void handle_trace_point(int type, void *trace, int cpu = 0, uint64_t time = 0);
+ virtual void handle_trace_point(int type, void *trace, int cpu = 0, uint64_t time = 0, unsigned char flags = 0);
};
diff --git a/perf/perf_event.h b/perf/perf_event.h
index 3b6c3e5..7d7cb5b 100644
--- a/perf/perf_event.h
+++ b/perf/perf_event.h
@@ -872,4 +872,23 @@ static inline void perf_event_init(void) { }
perf_output_copy((handle), &(x), sizeof(x))
#endif /* __KERNEL__ */
+
+
+/*
+ * trace_flag_type is an enumeration that holds different
+ * states when a trace occurs. These are:
+ * IRQS_OFF - interrupts were disabled
+ * IRQS_NOSUPPORT - arch does not support irqs_disabled_flags
+ * NEED_RESCED - reschedule is requested
+ * HARDIRQ - inside an interrupt handler
+ * SOFTIRQ - inside a softirq handler
+ */
+enum trace_flag_type {
+ TRACE_FLAG_IRQS_OFF = 0x01,
+ TRACE_FLAG_IRQS_NOSUPPORT = 0x02,
+ TRACE_FLAG_NEED_RESCHED = 0x04,
+ TRACE_FLAG_HARDIRQ = 0x08,
+ TRACE_FLAG_SOFTIRQ = 0x10,
+};
+
#endif /* _LINUX_PERF_EVENT_H */