summaryrefslogtreecommitdiff
path: root/ioshark/README
diff options
context:
space:
mode:
authorMohan Srinivasan <srmohan@google.com>2017-07-19 15:26:57 -0700
committerMohan Srinivasan <srmohan@google.com>2017-07-20 11:37:12 -0700
commit9dd787071c529105c59c46ce5ba1852ec36139af (patch)
tree592e72dbe658255e7a12ecdb706544e27a8bd8f7 /ioshark/README
parentb9d4b523807ec549c4b93921651122fa4ee9e8d1 (diff)
downloadextras-9dd787071c529105c59c46ce5ba1852ec36139af.tar.gz
IOshark portability across 32- and 64-bit, little/big endian devices.
Make IOshark portable across 32-bit and 64-bit devices, as well as little endian and big endian architectures. This is achieved by locking down the on-disk format of IOshark workload files. We can now generate the workload files on a 64-bit host and use those workload files to run the benchmark on a 32-bit userspace device (such as fugu). The change also has minor fixes to make IOshark work on taimen and walleye. Test: Test across 64- and 32-bit devices. Generate workload files on a 64 bit device and test on 32-bit devices (as well as 64-bit devices). Change-Id: I700ca5ae0da0ab029d977c906a63f1cd20a78a14 Signed-off-by: Mohan Srinivasan <srmohan@google.com>
Diffstat (limited to 'ioshark/README')
-rw-r--r--ioshark/README72
1 files changed, 72 insertions, 0 deletions
diff --git a/ioshark/README b/ioshark/README
index f71a2600..9a8eddc5 100644
--- a/ioshark/README
+++ b/ioshark/README
@@ -30,3 +30,75 @@ will launch as many threads as there are input files, so 1 thread/file.
-s : One line summary.
-q : Don't create the files in read-only partitions like /system and
/vendor. Instead do reads on those files.
+
+FILE FORMAT :
+-----------
+
+Each IOshark workload file is composed of the following
+
+Header
+File State : Table of File Entries. Each entry describes a file
+File Op : Table of File Operations. One entry describes one operation
+
+Each of the above is described below :
+
+Note : Everything is in Big Endian byte order.
+
+Header {
+ /* IOshark version number */
+ u_int64_t ioshark_version;
+ /* Total number of files used in this IOshark workload file */
+ u_int64_t num_files;
+ /* Total number of IO operations in this IOshark workload file */
+ u_int64_t num_io_operations;
+}
+
+File State {
+ u_int64_t fileno;
+ u_int64_t size;
+ u_int64_t global_filename_ix;
+}
+
+File Op {
+ /* delta us between previous file op and this */
+ u_int64_t delta_us;
+#define file_op file_op_union.file_op_u
+ union {
+ enum file_op file_op_u;
+ int32_t enum_size;
+ } file_op_union;
+ u_int64_t fileno;
+ union {
+ struct lseek_args {
+#define lseek_offset u.lseek_a.offset
+#define lseek_action u.lseek_a.action
+ u_int64_t offset;
+ int32_t action;
+ } lseek_a;
+ struct prw_args {
+#define prw_offset u.prw_a.offset
+#define prw_len u.prw_a.len
+ u_int64_t offset;
+ u_int64_t len;
+ } prw_a;
+#define rw_len u.rw_a.len
+ struct rw_args {
+ u_int64_t len;
+ } rw_a;
+#define mmap_offset u.mmap_a.offset
+#define mmap_len u.mmap_a.len
+#define mmap_prot u.mmap_a.prot
+ struct mmap_args {
+ u_int64_t offset;
+ u_int64_t len;
+ int32_t prot;
+ } mmap_a;
+#define open_flags u.open_a.flags
+#define open_mode u.open_a.mode
+ struct open_args {
+ int32_t flags;
+ int32_t mode;
+ } open_a;
+ } u;
+
+}