perf diff: Use llabs() with 64-bit values

To fix this build error on a debian mipsel cross build environment:

  builtin-diff.c: In function 'compute_cycles_diff':
  builtin-diff.c:649:10: error: absolute value function 'labs' given an argument of type 's64' {aka 'long long int'} but has parameter of type 'long int' which may cause truncation of value [-Werror=absolute-value]
    649 |    val = labs(pair->block_info->cycles_spark[i] -
        |          ^~~~

Fixes: cebf7d51 ("perf diff: Report noisy for cycles diff")
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-pn7szy5uw384ntjgk6zckh6a@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 98e93245
...@@ -646,7 +646,7 @@ static void compute_cycles_diff(struct hist_entry *he, ...@@ -646,7 +646,7 @@ static void compute_cycles_diff(struct hist_entry *he,
if (i >= he->block_info->num || i >= NUM_SPARKS) if (i >= he->block_info->num || i >= NUM_SPARKS)
break; break;
val = labs(pair->block_info->cycles_spark[i] - val = llabs(pair->block_info->cycles_spark[i] -
he->block_info->cycles_spark[i]); he->block_info->cycles_spark[i]);
update_spark_value(pair->diff.svals, NUM_SPARKS, update_spark_value(pair->diff.svals, NUM_SPARKS,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment