On aarch64 and ppc64le cycles_t is a slightly different type from the
x86_64 and does not match up with the %lld format. Cast c->cyles_sum
to always be (long long) to avoid the compile failing on aarch64 and
ppc64le with the following message:
**** failed systemtap kernel-devel smoke test:
/tmp/stapzubPmR/stap_e418199b88a6f8adf13a14e064ae79da_1403_src.c: In function '_stp_hrtimer_notify_function':
/tmp/stapzubPmR/stap_e418199b88a6f8adf13a14e064ae79da_1403_src.c:477:45: error: format '%lld' expects argument of type 'long long int', but argument 2 has type 'cycles_t' {aka 'long unsigned int'} [-Werror=format=]
_stp_error ("probe overhead (%lld cycles) exceeded threshold (%lld cycles) in last %lld cycles", c->cycles_sum, STP_OVERLOAD_THRESHOLD, STP_OVERLOAD_INTERVAL);
~~~^ ~~~~~~~~~~~~~
%ld
cc1: all warnings being treated as errors
s.op->newline() << "if (interval > STP_OVERLOAD_INTERVAL) {";
s.op->newline(1) << "if (c->cycles_sum > STP_OVERLOAD_THRESHOLD) {";
s.op->newline(1) << "_stp_error (\"probe overhead (%lld cycles) exceeded threshold (%lld cycles) in last"
- " %lld cycles\", c->cycles_sum, STP_OVERLOAD_THRESHOLD, STP_OVERLOAD_INTERVAL);";
+ " %lld cycles\", (long long) c->cycles_sum, STP_OVERLOAD_THRESHOLD, STP_OVERLOAD_INTERVAL);";
s.op->newline() << "atomic_set (session_state(), STAP_SESSION_ERROR);";
s.op->newline() << "atomic_inc (error_count());";
s.op->newline(-1) << "}";