[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/3] trace: Conform to QEMU coding style
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PATCH 2/3] trace: Conform to QEMU coding style |
Date: |
Tue, 6 Jul 2010 21:14:00 +0100 |
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
This applies to the tracing branch at:
http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/tracing-dev
simpletrace.c | 21 ++++++++++++++-------
tracetool | 3 ++-
2 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/simpletrace.c b/simpletrace.c
index 5c327af..ace009f 100644
--- a/simpletrace.c
+++ b/simpletrace.c
@@ -24,7 +24,8 @@ static FILE *trace_fp;
static void trace(TraceEventID event, unsigned long x1,
unsigned long x2, unsigned long x3,
- unsigned long x4, unsigned long x5) {
+ unsigned long x4, unsigned long x5)
+{
struct timespec ts; /* TODO make qemu-timer.h work in qemu-io and friends
*/
clock_gettime(CLOCK_MONOTONIC, &ts);
@@ -55,27 +56,33 @@ static void trace(TraceEventID event, unsigned long x1,
}
}
-void trace0(TraceEventID event) {
+void trace0(TraceEventID event)
+{
trace(event, 0, 0, 0, 0, 0);
}
-void trace1(TraceEventID event, unsigned long x1) {
+void trace1(TraceEventID event, unsigned long x1)
+{
trace(event, x1, 0, 0, 0, 0);
}
-void trace2(TraceEventID event, unsigned long x1, unsigned long x2) {
+void trace2(TraceEventID event, unsigned long x1, unsigned long x2)
+{
trace(event, x1, x2, 0, 0, 0);
}
-void trace3(TraceEventID event, unsigned long x1, unsigned long x2, unsigned
long x3) {
+void trace3(TraceEventID event, unsigned long x1, unsigned long x2, unsigned
long x3)
+{
trace(event, x1, x2, x3, 0, 0);
}
-void trace4(TraceEventID event, unsigned long x1, unsigned long x2, unsigned
long x3, unsigned long x4) {
+void trace4(TraceEventID event, unsigned long x1, unsigned long x2, unsigned
long x3, unsigned long x4)
+{
trace(event, x1, x2, x3, x4, 0);
}
-void trace5(TraceEventID event, unsigned long x1, unsigned long x2, unsigned
long x3, unsigned long x4, unsigned long x5) {
+void trace5(TraceEventID event, unsigned long x1, unsigned long x2, unsigned
long x3, unsigned long x4, unsigned long x5)
+{
trace(event, x1, x2, x3, x4, x5);
}
diff --git a/tracetool b/tracetool
index 9ce8e74..43757e3 100755
--- a/tracetool
+++ b/tracetool
@@ -169,7 +169,8 @@ linetoh_simple()
fi
cat <<EOF
-static inline void trace_$name($args) {
+static inline void trace_$name($args)
+{
trace$argc($trace_args);
}
EOF
--
1.7.1