Skip to content

Commit 8919109

Browse files
ikegami-tigaw
authored andcommitted
amzn: use PRIu64 printf format string instead of llu
To fix the cross compiler build fails. Signed-off-by: Tokunori Ikegami <[email protected]>
1 parent b5f7873 commit 8919109

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

plugins/amzn/amzn-nvme.c

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ static void amzn_print_latency_histogram(struct amzn_latency_histogram *hist)
108108
for (int b = 0; b < hist->num_bins && b < 64; b++) {
109109
struct amzn_latency_histogram_bin *bin = &hist->bins[b];
110110

111-
printf("[%-8llu - %-8llu] => %-8u\n",
112-
bin->lower, bin->upper, bin->count);
111+
printf("[%-8"PRIu64" - %-8"PRIu64"] => %-8u\n",
112+
(uint64_t)bin->lower, (uint64_t)bin->upper, bin->count);
113113
}
114114

115115
printf("=================================\n\n");
@@ -174,27 +174,27 @@ static void amzn_print_json_stats(struct amzn_latency_log_page *log)
174174
static void amzn_print_normal_stats(struct amzn_latency_log_page *log)
175175
{
176176
printf("Total Ops:\n");
177-
printf(" Read: %llu\n", log->total_read_ops);
178-
printf(" Write: %llu\n", log->total_write_ops);
177+
printf(" Read: %"PRIu64"\n", (uint64_t)log->total_read_ops);
178+
printf(" Write: %"PRIu64"\n", (uint64_t)log->total_write_ops);
179179
printf("Total Bytes:\n");
180-
printf(" Read: %llu\n", log->total_read_bytes);
181-
printf(" Write: %llu\n", log->total_write_bytes);
180+
printf(" Read: %"PRIu64"\n", (uint64_t)log->total_read_bytes);
181+
printf(" Write: %"PRIu64"\n", (uint64_t)log->total_write_bytes);
182182
printf("Total Time (us):\n");
183-
printf(" Read: %llu\n", log->total_read_time);
184-
printf(" Write: %llu\n\n", log->total_write_time);
183+
printf(" Read: %"PRIu64"\n", (uint64_t)log->total_read_time);
184+
printf(" Write: %"PRIu64"\n\n", (uint64_t)log->total_write_time);
185185

186186
printf("EBS Volume Performance Exceeded (us):\n");
187-
printf(" IOPS: %llu\n", log->ebs_volume_performance_exceeded_iops);
188-
printf(" Throughput: %llu\n\n",
189-
log->ebs_volume_performance_exceeded_tp);
187+
printf(" IOPS: %"PRIu64"\n", (uint64_t)log->ebs_volume_performance_exceeded_iops);
188+
printf(" Throughput: %"PRIu64"\n\n",
189+
(uint64_t)log->ebs_volume_performance_exceeded_tp);
190190
printf("EC2 Instance EBS Performance Exceeded (us):\n");
191-
printf(" IOPS: %llu\n",
192-
log->ec2_instance_ebs_performance_exceeded_iops);
193-
printf(" Throughput: %llu\n\n",
194-
log->ec2_instance_ebs_performance_exceeded_tp);
191+
printf(" IOPS: %"PRIu64"\n",
192+
(uint64_t)log->ec2_instance_ebs_performance_exceeded_iops);
193+
printf(" Throughput: %"PRIu64"\n\n",
194+
(uint64_t)log->ec2_instance_ebs_performance_exceeded_tp);
195195

196-
printf("Queue Length (point in time): %llu\n\n",
197-
log->volume_queue_length);
196+
printf("Queue Length (point in time): %"PRIu64"\n\n",
197+
(uint64_t)log->volume_queue_length);
198198

199199
printf("Read IO Latency Histogram\n");
200200
amzn_print_latency_histogram(&log->read_io_latency_histogram);

0 commit comments

Comments
 (0)