summaryrefslogtreecommitdiff
path: root/ioshark/ioshark_bench.h
diff options
context:
space:
mode:
authorMohan Srinivasan <srmohan@google.com>2017-02-24 16:34:28 -0800
committerMohan Srinivasan <srmohan@google.com>2017-02-27 20:01:11 -0800
commit02f8626d766424406bcfea1e20ef352d3b9a72cf (patch)
tree768ececfd4d106049585ab238302e9f71f395797 /ioshark/ioshark_bench.h
parent2aa6e6fbda3ac6781efd022f01f8006cedda878d (diff)
downloadextras-02f8626d766424406bcfea1e20ef352d3b9a72cf.tar.gz
IOshark support to not pre-create files in /system, /vendor, ...
1) Add support to IOshark to not pre-create files that the workload read from /system, /vendor and other read-only partitions. Instead we just read the underlying files directly. 2) This support is implemented under a new -q (quick) mode. 3) Other misc fixes to do a setrlimit(NO_FD) so we don't run out of fds during test. 4) Also commiting raw strace files from several monkey runs so we can compile those if we make on disk IOshark format changes in the future. Test: Run IOshark with different workloads to make sure that this skipping of pre-creation works fine. Change-Id: Ic025cb0162eca479d9f529846e619dd4b71aa490 Signed-off-by: Mohan Srinivasan <srmohan@google.com>
Diffstat (limited to 'ioshark/ioshark_bench.h')
-rw-r--r--ioshark/ioshark_bench.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/ioshark/ioshark_bench.h b/ioshark/ioshark_bench.h
index 95e6a317..d0d09626 100644
--- a/ioshark/ioshark_bench.h
+++ b/ioshark/ioshark_bench.h
@@ -46,6 +46,7 @@ struct files_db_s {
int fileno;
size_t size;
int fd;
+ int readonly;
int debug_open_flags;
struct files_db_s *next;
};
@@ -96,6 +97,12 @@ files_db_get_filename(void *node)
return (((struct files_db_s *)node)->filename);
}
+static inline int
+files_db_readonly(void *node)
+{
+ return (((struct files_db_s *)node)->readonly);
+}
+
static inline u_int64_t
get_msecs(struct timeval *tv)
{
@@ -122,7 +129,7 @@ update_delta_time(struct timeval *start,
void *files_db_create_handle(void);
void *files_db_lookup_byfileno(void *handle, int fileno);
-void *files_db_add_byfileno(void *handle, int fileno);
+void *files_db_add_byfileno(void *handle, int fileno, int readonly);
void files_db_update_fd(void *node, int fd);
void files_db_unlink_files(void *db_handle);
void files_db_close_files(void *handle);
@@ -141,13 +148,7 @@ void ioshark_handle_mmap(void *db_node,
void capture_util_state_before(void);
void report_cpu_disk_util(void);
-
-
-
-
-
-
-
-
-
-
+char *get_ro_filename(int ix);
+void init_filename_cache(void);
+void free_filename_cache(void);
+int is_readonly_mount(char *filename, size_t size);