Use tprints with literal strings, it may be faster than tprintf
* bjm.c: Replace tprintf("str") with tprints("str").
* block.c: Likewise.
* desc.c: Likewise.
* file.c: Likewise.
* io.c: Likewise.
* ipc.c: Likewise.
* mem.c: Likewise.
* net.c: Likewise.
* proc.c: Likewise.
* process.c: Likewise.
* quota.c: Likewise.
* resource.c: Likewise.
* scsi.c: Likewise.
* signal.c: Likewise.
* sock.c: Likewise.
* strace.c: Likewise.
* stream.c: Likewise.
* syscall.c: Likewise.
* system.c: Likewise.
* term.c: Likewise.
* time.c: Likewise.
* util.c: Likewise.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
diff --git a/resource.c b/resource.c
index b9550b8..9a90ad8 100644
--- a/resource.c
+++ b/resource.c
@@ -132,7 +132,7 @@
} rlim;
if (umove(tcp, tcp->u_arg[1], &rlim) < 0)
- tprintf("{...}");
+ tprints("{...}");
else {
tprintf("{rlim_cur=%s,",
sprintrlim(rlim.rlim_cur == -1 ? RLIM_INFINITY
@@ -151,7 +151,7 @@
if (entering(tcp)) {
printxval(resources, tcp->u_arg[0], "RLIMIT_???");
- tprintf(", ");
+ tprints(", ");
}
else {
if (syserror(tcp) || !verbose(tcp))
@@ -161,7 +161,7 @@
print_rlimit32(tcp);
# endif
else if (umove(tcp, tcp->u_arg[1], &rlim) < 0)
- tprintf("{...}");
+ tprints("{...}");
else {
tprintf("{rlim_cur=%s,", sprintrlim(rlim.rlim_cur));
tprintf(" rlim_max=%s}", sprintrlim(rlim.rlim_max));
@@ -177,7 +177,7 @@
if (entering(tcp)) {
printxval(resources, tcp->u_arg[0], "RLIMIT_???");
- tprintf(", ");
+ tprints(", ");
if (!verbose(tcp))
tprintf("%#lx", tcp->u_arg[1]);
# if defined LINUX && (defined POWERPC64 || defined X86_64)
@@ -185,7 +185,7 @@
print_rlimit32(tcp);
# endif
else if (umove(tcp, tcp->u_arg[1], &rlim) < 0)
- tprintf("{...}");
+ tprints("{...}");
else {
tprintf("{rlim_cur=%s,", sprintrlim(rlim.rlim_cur));
tprintf(" rlim_max=%s}", sprintrlim(rlim.rlim_max));
@@ -217,13 +217,13 @@
if (entering(tcp)) {
printxval(resources, tcp->u_arg[0], "RLIMIT_???");
- tprintf(", ");
+ tprints(", ");
}
else {
if (syserror(tcp) || !verbose(tcp))
tprintf("%#lx", tcp->u_arg[1]);
else if (umove(tcp, tcp->u_arg[1], &rlim) < 0)
- tprintf("{...}");
+ tprints("{...}");
else {
tprintf("{rlim_cur=%s,", sprintrlim64(rlim.rlim_cur));
tprintf(" rlim_max=%s}", sprintrlim64(rlim.rlim_max));
@@ -239,11 +239,11 @@
if (entering(tcp)) {
printxval(resources, tcp->u_arg[0], "RLIMIT_???");
- tprintf(", ");
+ tprints(", ");
if (!verbose(tcp))
tprintf("%#lx", tcp->u_arg[1]);
else if (umove(tcp, tcp->u_arg[1], &rlim) < 0)
- tprintf("{...}");
+ tprints("{...}");
else {
tprintf("{rlim_cur=%s,", sprintrlim64(rlim.rlim_cur));
tprintf(" rlim_max=%s}", sprintrlim64(rlim.rlim_max));
@@ -292,11 +292,11 @@
} ru;
if (!addr)
- tprintf("NULL");
+ tprints("NULL");
else if (syserror(tcp) || !verbose(tcp))
tprintf("%#lx", addr);
else if (umove(tcp, addr, &ru) < 0)
- tprintf("{...}");
+ tprints("{...}");
else if (!abbrev(tcp)) {
tprintf("{ru_utime={%lu, %lu}, ru_stime={%lu, %lu}, ",
(long) ru.ru_utime.tv_sec, (long) ru.ru_utime.tv_usec,
@@ -328,11 +328,11 @@
struct rusage ru;
if (!addr)
- tprintf("NULL");
+ tprints("NULL");
else if (syserror(tcp) || !verbose(tcp))
tprintf("%#lx", addr);
else if (umove(tcp, addr, &ru) < 0)
- tprintf("{...}");
+ tprints("{...}");
else if (!abbrev(tcp)) {
tprintf("{ru_utime={%lu, %lu}, ru_stime={%lu, %lu}, ",
(long) ru.ru_utime.tv_sec, (long) ru.ru_utime.tv_usec,
@@ -362,7 +362,7 @@
{
if (entering(tcp)) {
printxval(usagewho, tcp->u_arg[0], "RUSAGE_???");
- tprintf(", ");
+ tprints(", ");
}
else
printrusage(tcp, tcp->u_arg[1]);
@@ -375,7 +375,7 @@
{
if (entering(tcp)) {
printxval(usagewho, tcp->u_arg[0], "RUSAGE_???");
- tprintf(", ");
+ tprints(", ");
}
else
printrusage32(tcp, tcp->u_arg[1]);
@@ -396,7 +396,7 @@
if (syserror(tcp) || !verbose(tcp))
tprintf("%#lx", tcp->u_arg[0]);
else if (umove(tcp, tcp->u_arg[0], &si) < 0)
- tprintf("{...}");
+ tprints("{...}");
else {
tprintf("{uptime=%lu, loads=[%lu, %lu, %lu] ",
si.uptime, si.loads[0], si.loads[1],
@@ -458,11 +458,11 @@
if (exiting(tcp)) {
if (tcp->u_arg[0] == 0)
- tprintf("NULL");
+ tprints("NULL");
else if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[0]);
else if (umove(tcp, tcp->u_arg[0], &tbuf) < 0)
- tprintf("{...}");
+ tprints("{...}");
else {
tprintf("{tms_utime=%lu, tms_stime=%lu, ",
tbuf.tms_utime, tbuf.tms_stime);