Module Name:    src
Committed By:   skrll
Date:           Thu Oct 14 09:52:40 UTC 2021

Modified Files:
        src/usr.sbin/tprof: tprof_analyze.c

Log Message:
Output alignement - give lwp 6 characters


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/tprof/tprof_analyze.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/tprof/tprof_analyze.c
diff -u src/usr.sbin/tprof/tprof_analyze.c:1.4 src/usr.sbin/tprof/tprof_analyze.c:1.5
--- src/usr.sbin/tprof/tprof_analyze.c:1.4	Sat Jan 30 11:46:25 2021
+++ src/usr.sbin/tprof/tprof_analyze.c	Thu Oct 14 09:52:40 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: tprof_analyze.c,v 1.4 2021/01/30 11:46:25 jmcneill Exp $	*/
+/*	$NetBSD: tprof_analyze.c,v 1.5 2021/10/14 09:52:40 skrll Exp $	*/
 
 /*
  * Copyright (c) 2010,2011,2012 YAMAMOTO Takashi,
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: tprof_analyze.c,v 1.4 2021/01/30 11:46:25 jmcneill Exp $");
+__RCSID("$NetBSD: tprof_analyze.c,v 1.5 2021/10/14 09:52:40 skrll Exp $");
 #endif /* not lint */
 
 #include <assert.h>
@@ -423,8 +423,8 @@ tprof_analyze(int argc, char **argv)
 	 */
 	printf("File: %s\n", argv[0]);
 	printf("Number of samples: %zu\n\n", nsamples);
-	printf("percentage   nsamples pid    lwp  cpu  k address          symbol\n");
-	printf("------------ -------- ------ ---- ---- - ---------------- ------\n");
+	printf("percentage   nsamples pid    lwp    cpu  k address          symbol\n");
+	printf("------------ -------- ------ ------ ---- - ---------------- ------\n");
 	for (i = 0; i < naddrs; i++) {
 		const char *name;
 		char buf[100];
@@ -448,7 +448,7 @@ tprof_analyze(int argc, char **argv)
 
 		perc = ((float)a->nsamples / (float)nsamples) * 100.0;
 
-		printf("%11f%% %8u %6" PRIu32 " %4" PRIu32 " %4" PRIu32 " %u %016"
+		printf("%11f%% %8u %6" PRIu32 " %6" PRIu32 " %4" PRIu32 " %u %016"
 		    PRIx64 " %s\n",
 		    perc,
 		    a->nsamples, a->pid, a->lwpid, a->cpuid, a->in_kernel,

Reply via email to