Use tprints instead of tprintf in a few more places
* bpf.c (bpf_obj_manage, bpf_prog_attach_detach): Replace tprintf with tprints for printing strings without format specifiers. * dm.c (dm_decode_dm_target_spec): Likewise. * mq.c (SYS_FUNC(mq_timedreceive)): Likewise. * perf.c (print_perf_event_attr): Likewise. * syscall.c (trace_syscall_exiting): Likewise.
This commit is contained in:
parent
5b2e59a413
commit
55d126a8d7
14
bpf.c
14
bpf.c
@ -198,11 +198,11 @@ bpf_obj_manage(struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
if (umoven_or_printaddr(tcp, addr, size, &attr))
|
||||
return RVAL_DECODED | RVAL_FD;
|
||||
|
||||
tprintf("{pathname=");
|
||||
tprints("{pathname=");
|
||||
printpath(tcp, attr.pathname);
|
||||
tprints(", bpf_fd=");
|
||||
printfd(tcp, attr.bpf_fd);
|
||||
tprintf("}");
|
||||
tprints("}");
|
||||
|
||||
return RVAL_DECODED | RVAL_FD;
|
||||
}
|
||||
@ -224,19 +224,19 @@ bpf_prog_attach_detach(struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
if (umoven_or_printaddr(tcp, addr, size, &attr))
|
||||
return RVAL_DECODED;
|
||||
|
||||
tprintf("{target_fd=");
|
||||
tprints("{target_fd=");
|
||||
printfd(tcp, attr.target_fd);
|
||||
if (print_attach) {
|
||||
tprintf(", attach_bpf_fd=");
|
||||
tprints(", attach_bpf_fd=");
|
||||
printfd(tcp, attr.attach_bpf_fd);
|
||||
}
|
||||
tprintf(", attach_type=");
|
||||
tprints(", attach_type=");
|
||||
printxval(bpf_attach_type, attr.attach_type, "BPF_???");
|
||||
if (print_attach) {
|
||||
tprintf(", attach_flags=");
|
||||
tprints(", attach_flags=");
|
||||
printflags(bpf_attach_flags, attr.attach_flags, "BPF_F_???");
|
||||
}
|
||||
tprintf("}");
|
||||
tprints("}");
|
||||
|
||||
return RVAL_DECODED;
|
||||
}
|
||||
|
2
dm.c
2
dm.c
@ -180,7 +180,7 @@ dm_decode_dm_target_spec(struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
tprints(", string=");
|
||||
printstr_ex(tcp, addr + offset_end, ioc->data_size - offset_end,
|
||||
QUOTE_0_TERMINATED);
|
||||
tprintf("}");
|
||||
tprints("}");
|
||||
|
||||
if (entering(tcp))
|
||||
offset += s.next;
|
||||
|
2
mq.c
2
mq.c
@ -66,7 +66,7 @@ SYS_FUNC(mq_timedreceive)
|
||||
printstrn(tcp, tcp->u_arg[1], tcp->u_rval);
|
||||
tprintf(", %" PRI_klu ", ", tcp->u_arg[2]);
|
||||
printnum_int(tcp, tcp->u_arg[3], "%u");
|
||||
tprintf(", ");
|
||||
tprints(", ");
|
||||
/*
|
||||
* Since the timeout parameter is read by the kernel
|
||||
* on entering syscall, it has to be decoded the same way
|
||||
|
16
perf.c
16
perf.c
@ -160,7 +160,7 @@ print_perf_event_attr(struct tcb *const tcp, const kernel_ulong_t addr)
|
||||
}
|
||||
|
||||
PRINT_XLAT("{type=", perf_type_id, attr->type, "PERF_TYPE_???");
|
||||
tprintf(", size=");
|
||||
tprints(", size=");
|
||||
printxval(perf_attr_size, attr->size, "PERF_ATTR_SIZE_???");
|
||||
|
||||
if (use_new_size) {
|
||||
@ -217,7 +217,7 @@ print_perf_event_attr(struct tcb *const tcp, const kernel_ulong_t addr)
|
||||
PRINT_XLAT("<<8|", perf_hw_cache_op_result_id,
|
||||
(attr->config >> 16) & 0xFF,
|
||||
"PERF_COUNT_HW_CACHE_RESULT_???");
|
||||
tprintf("<<16");
|
||||
tprints("<<16");
|
||||
if (attr->config >> 24)
|
||||
tprintf("|%#" PRIx64 "<<24 "
|
||||
"/* PERF_COUNT_HW_CACHE_??? */",
|
||||
@ -253,11 +253,11 @@ print_perf_event_attr(struct tcb *const tcp, const kernel_ulong_t addr)
|
||||
else
|
||||
tprintf(", sample_period=%" PRIu64, attr->sample_period);
|
||||
|
||||
tprintf(", sample_type=");
|
||||
tprints(", sample_type=");
|
||||
printflags64(perf_event_sample_format, attr->sample_type,
|
||||
"PERF_SAMPLE_???");
|
||||
|
||||
tprintf(", read_format=");
|
||||
tprints(", read_format=");
|
||||
printflags64(perf_event_read_format, attr->read_format,
|
||||
"PERF_FORMAT_???");
|
||||
|
||||
@ -355,7 +355,7 @@ print_perf_event_attr(struct tcb *const tcp, const kernel_ulong_t addr)
|
||||
|
||||
_PERF_CHECK_FIELD(branch_sample_type);
|
||||
if (attr->sample_type & PERF_SAMPLE_BRANCH_STACK) {
|
||||
tprintf(", branch_sample_type=");
|
||||
tprints(", branch_sample_type=");
|
||||
printflags64(perf_branch_sample_type, attr->branch_sample_type,
|
||||
"PERF_SAMPLE_BRANCH_???");
|
||||
}
|
||||
@ -380,7 +380,7 @@ print_perf_event_attr(struct tcb *const tcp, const kernel_ulong_t addr)
|
||||
|
||||
if (attr->use_clockid) {
|
||||
_PERF_CHECK_FIELD(clockid);
|
||||
tprintf(", clockid=");
|
||||
tprints(", clockid=");
|
||||
printxval(clocknames, attr->clockid, "CLOCK_???");
|
||||
}
|
||||
|
||||
@ -399,9 +399,9 @@ print_perf_event_attr(struct tcb *const tcp, const kernel_ulong_t addr)
|
||||
print_perf_event_attr_out:
|
||||
if ((attr->size && (attr->size > size)) ||
|
||||
(!attr->size && (size < PERF_ATTR_SIZE_VER0)))
|
||||
tprintf(", ...");
|
||||
tprints(", ...");
|
||||
|
||||
tprintf("}");
|
||||
tprints("}");
|
||||
}
|
||||
|
||||
SYS_FUNC(perf_event_open)
|
||||
|
Loading…
x
Reference in New Issue
Block a user