summaryrefslogtreecommitdiff
path: root/ioshark
diff options
context:
space:
mode:
authorJin Qian <jinqian@google.com>2016-12-21 14:53:03 -0800
committerJin Qian <jinqian@google.com>2016-12-21 15:08:28 -0800
commit8e4d12dacfaae835ea4226b3c4707f93a9ec9ce7 (patch)
tree8eeeb3332bd914cbb58905b4075c14e27e25674c /ioshark
parent0d69af9d9a24059151eb8ee09a343bd4155b7e12 (diff)
downloadextras-8e4d12dacfaae835ea4226b3c4707f93a9ec9ce7.tar.gz
ioshark: fix build break
Change-Id: Ief46c02a29a4787191004a5cc2e616175a0384da
Diffstat (limited to 'ioshark')
-rw-r--r--ioshark/ioshark_bench.c32
-rw-r--r--ioshark/ioshark_bench_subr.c4
2 files changed, 18 insertions, 18 deletions
diff --git a/ioshark/ioshark_bench.c b/ioshark/ioshark_bench.c
index 9bbfcae1..9eb23c89 100644
--- a/ioshark/ioshark_bench.c
+++ b/ioshark/ioshark_bench.c
@@ -217,7 +217,7 @@ do_one_io(void *db_node,
rw_bytes->bytes_read += file_op->prw_len;
if (ret < 0) {
fprintf(stderr,
- "%s: pread(%s %lu %lu) error %d\n",
+ "%s: pread(%s %zu %lu) error %d\n",
progname,
files_db_get_filename(db_node),
file_op->prw_len,
@@ -235,7 +235,7 @@ do_one_io(void *db_node,
rw_bytes->bytes_written += file_op->prw_len;
if (ret < 0) {
fprintf(stderr,
- "%s: pwrite(%s %lu %lu) error %d\n",
+ "%s: pwrite(%s %zu %lu) error %d\n",
progname,
files_db_get_filename(db_node),
file_op->prw_len,
@@ -253,7 +253,7 @@ do_one_io(void *db_node,
rw_bytes->bytes_read += file_op->rw_len;
if (ret < 0) {
fprintf(stderr,
- "%s: read(%s %lu) error %d\n",
+ "%s: read(%s %zu) error %d\n",
progname,
files_db_get_filename(db_node),
file_op->rw_len,
@@ -271,7 +271,7 @@ do_one_io(void *db_node,
rw_bytes->bytes_written += file_op->rw_len;
if (ret < 0) {
fprintf(stderr,
- "%s: write(%s %lu) error %d\n",
+ "%s: write(%s %zu) error %d\n",
progname,
files_db_get_filename(db_node),
file_op->rw_len,
@@ -725,19 +725,19 @@ main(int argc, char **argv)
files_db_free_memory(state->db_handle);
}
}
- printf("Total Creation time = %lu.%lu (msecs.usecs)\n",
- get_msecs(&aggregate_file_create_time),
- get_usecs(&aggregate_file_create_time));
- printf("Total Remove time = %lu.%lu (msecs.usecs)\n",
- get_msecs(&aggregate_file_remove_time),
- get_usecs(&aggregate_file_remove_time));
+ printf("Total Creation time = %llu.%llu (msecs.usecs)\n",
+ (unsigned long long)get_msecs(&aggregate_file_create_time),
+ (unsigned long long)get_usecs(&aggregate_file_create_time));
+ printf("Total Remove time = %llu.%llu (msecs.usecs)\n",
+ (unsigned long long)get_msecs(&aggregate_file_remove_time),
+ (unsigned long long)get_usecs(&aggregate_file_remove_time));
if (do_delay)
- printf("Total delay time = %lu.%lu (msecs.usecs)\n",
- get_msecs(&aggregate_delay_time),
- get_usecs(&aggregate_delay_time));
- printf("Total IO time = %lu.%lu (msecs.usecs)\n",
- get_msecs(&aggregate_IO_time),
- get_usecs(&aggregate_IO_time));
+ printf("Total delay time = %llu.%llu (msecs.usecs)\n",
+ (unsigned long long)get_msecs(&aggregate_delay_time),
+ (unsigned long long)get_usecs(&aggregate_delay_time));
+ printf("Total IO time = %llu.%llu (msecs.usecs)\n",
+ (unsigned long long)get_msecs(&aggregate_IO_time),
+ (unsigned long long)get_usecs(&aggregate_IO_time));
print_bytes("Upfront File Creation bytes",
&aggr_create_rw_bytes);
print_bytes("IO bytes", &aggr_io_rw_bytes);
diff --git a/ioshark/ioshark_bench_subr.c b/ioshark/ioshark_bench_subr.c
index ff273cce..2056d448 100644
--- a/ioshark/ioshark_bench_subr.c
+++ b/ioshark/ioshark_bench_subr.c
@@ -308,8 +308,8 @@ print_op_stats(u_int64_t *op_counts)
printf("IO Operation counts :\n");
for (i = IOSHARK_LSEEK ; i < IOSHARK_MAX_FILE_OP ; i++) {
- printf("%s: %lu\n",
- IO_op[i], op_counts[i]);
+ printf("%s: %llu\n",
+ IO_op[i], (unsigned long long)op_counts[i]);
}
}