Module Name: src Committed By: martin Date: Mon Dec 26 11:23:57 UTC 2022
Modified Files: src/usr.sbin/tprof [netbsd-10]: tprof.c Log Message: Pull up following revision(s) (requested by ryo in ticket #24): usr.sbin/tprof/tprof.c: revision 1.19 usr.sbin/tprof/tprof.c: revision 1.20 Reflect recent new options for top operation, add a and c fixed parsing of event options. if event option was specivied, it was stuck in a busy loop. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.18.2.1 src/usr.sbin/tprof/tprof.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.c diff -u src/usr.sbin/tprof/tprof.c:1.18 src/usr.sbin/tprof/tprof.c:1.18.2.1 --- src/usr.sbin/tprof/tprof.c:1.18 Fri Dec 16 08:02:04 2022 +++ src/usr.sbin/tprof/tprof.c Mon Dec 26 11:23:56 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: tprof.c,v 1.18 2022/12/16 08:02:04 ryo Exp $ */ +/* $NetBSD: tprof.c,v 1.18.2.1 2022/12/26 11:23:56 martin Exp $ */ /* * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: tprof.c,v 1.18 2022/12/16 08:02:04 ryo Exp $"); +__RCSID("$NetBSD: tprof.c,v 1.18.2.1 2022/12/26 11:23:56 martin Exp $"); #endif /* not lint */ #include <sys/atomic.h> @@ -133,7 +133,7 @@ usage(void) " only outputs a counter.\n"); fprintf(stderr, "\tanalyze [-CkLPs] [-p pid] file\n"); fprintf(stderr, "\t\tAnalyze the samples of the file 'file'.\n"); - fprintf(stderr, "\ttop [-e name [-e ...]] [-i interval] [-u]\n"); + fprintf(stderr, "\ttop [-e name [-e ...]] [-i interval] [-acu]\n"); fprintf(stderr, "\t\tDisplay profiling results in real-time.\n"); exit(EXIT_FAILURE); } @@ -310,6 +310,7 @@ tprof_parse_event(tprof_param_t *param, "invalid option: '%c'", *opt); goto done; } + opt++; } } else if (allow_option) { param->p_flags |= TPROF_PARAM_USER;