mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 22:51:37 +00:00
[PATCH] blktrace: add timestamp message
This adds a new timestamp message to blktrace, giving the timeofday when we starting tracing. This helps user space correlate block trace events with eg an application strace. This requires a (compatible) update to blkparse. The changed blkparse is still able to process traces generated by older kernels, and older versions of blkparse should silently ignore the new records (because they have a pid of 0). Signed-off-by: Olaf Kirch <okir@suse.de> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
parent
0215ffb08c
commit
be1c63411a
2 changed files with 57 additions and 12 deletions
|
@ -49,6 +49,15 @@ enum blktrace_act {
|
|||
__BLK_TA_REMAP, /* bio was remapped */
|
||||
};
|
||||
|
||||
/*
|
||||
* Notify events.
|
||||
*/
|
||||
enum blktrace_notify {
|
||||
__BLK_TN_PROCESS = 0, /* establish pid/name mapping */
|
||||
__BLK_TN_TIMESTAMP, /* include system clock */
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Trace actions in full. Additionally, read or write is masked
|
||||
*/
|
||||
|
@ -68,6 +77,9 @@ enum blktrace_act {
|
|||
#define BLK_TA_BOUNCE (__BLK_TA_BOUNCE)
|
||||
#define BLK_TA_REMAP (__BLK_TA_REMAP | BLK_TC_ACT(BLK_TC_QUEUE))
|
||||
|
||||
#define BLK_TN_PROCESS (__BLK_TN_PROCESS | BLK_TC_ACT(BLK_TC_NOTIFY))
|
||||
#define BLK_TN_TIMESTAMP (__BLK_TN_TIMESTAMP | BLK_TC_ACT(BLK_TC_NOTIFY))
|
||||
|
||||
#define BLK_IO_TRACE_MAGIC 0x65617400
|
||||
#define BLK_IO_TRACE_VERSION 0x07
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue