summaryrefslogtreecommitdiff
path: root/blktrace.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2006-02-09 13:58:34 +0100
committerJens Axboe <axboe@suse.de>2006-02-09 13:58:34 +0100
commitbfc70ad577ae97011eed84b86b3c6ba01e23e80a (patch)
tree280f82f98be69ba559ef6743bbcc4fec729ad5f6 /blktrace.h
parent5975d309ac40b9724f70b46bbfa3747e8dc24ea5 (diff)
downloadblktrace-bfc70ad577ae97011eed84b86b3c6ba01e23e80a.tar.gz
blktrace-bfc70ad577ae97011eed84b86b3c6ba01e23e80a.tar.bz2
[PATCH] Shrink the trace by 1/3 by removing ->comm[16]
We now send notify messages out when we see a new process, so we don't need to repeatedly send the same 16 bytes of name info everytime.
Diffstat (limited to 'blktrace.h')
-rw-r--r--blktrace.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/blktrace.h b/blktrace.h
index 8beb415..ca7c25f 100644
--- a/blktrace.h
+++ b/blktrace.h
@@ -56,7 +56,7 @@ extern FILE *ofp;
extern int data_is_native;
#define CHECK_MAGIC(t) (((t)->magic & 0xffffff00) == BLK_IO_TRACE_MAGIC)
-#define SUPPORTED_VERSION (0x06)
+#define SUPPORTED_VERSION (0x07)
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define be16_to_cpu(x) __bswap_16(x)
@@ -103,11 +103,10 @@ static inline void trace_to_cpu(struct blk_io_trace *t)
t->bytes = be32_to_cpu(t->bytes);
t->action = be32_to_cpu(t->action);
t->pid = be32_to_cpu(t->pid);
- t->cpu = be32_to_cpu(t->cpu);
+ t->device = be32_to_cpu(t->device);
+ t->cpu = be16_to_cpu(t->cpu);
t->error = be16_to_cpu(t->error);
t->pdu_len = be16_to_cpu(t->pdu_len);
- t->device = be32_to_cpu(t->device);
- /* t->comm is a string (endian neutral) */
}
/*
@@ -137,5 +136,6 @@ extern void process_fmt(char *, struct per_cpu_info *, struct blk_io_trace *,
unsigned long long, int, unsigned char *);
extern int valid_act_opt(int);
extern int find_mask_map(char *);
+extern char *find_process_name(pid_t);
#endif