Skip to content

Commit

Permalink
perf tools: Use %zd for size_t printf formats on 32-bit
Browse files Browse the repository at this point in the history
A couple of trivial fixes for using %zd for size_t in the code
supporting the ZSTD compression library.

Signed-off-by: Chris Wilson <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Alexey Budankov <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lore.kernel.org/lkml/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
  • Loading branch information
ickle authored and acmel committed Sep 1, 2020
1 parent 57ed628 commit 20befbb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tools/perf/util/session.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ static int perf_session__process_compressed_event(struct perf_session *session,
session->decomp_last = decomp;
}

pr_debug("decomp (B): %ld to %ld\n", src_size, decomp_size);
pr_debug("decomp (B): %zd to %zd\n", src_size, decomp_size);

return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/util/zstd.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ size_t zstd_decompress_stream(struct zstd_data *data, void *src, size_t src_size
while (input.pos < input.size) {
ret = ZSTD_decompressStream(data->dstream, &output, &input);
if (ZSTD_isError(ret)) {
pr_err("failed to decompress (B): %ld -> %ld, dst_size %ld : %s\n",
pr_err("failed to decompress (B): %zd -> %zd, dst_size %zd : %s\n",
src_size, output.size, dst_size, ZSTD_getErrorName(ret));
break;
}
Expand Down

0 comments on commit 20befbb

Please sign in to comment.