aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/pmc
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/pmc')
-rw-r--r--usr.sbin/pmc/Makefile11
-rw-r--r--usr.sbin/pmc/cmd_pmc.h4
-rw-r--r--usr.sbin/pmc/cmd_pmc_filter.cc8
-rw-r--r--usr.sbin/pmc/cmd_pmc_list.c5
-rw-r--r--usr.sbin/pmc/cmd_pmc_stat.c5
-rw-r--r--usr.sbin/pmc/cmd_pmc_summary.cc5
-rw-r--r--usr.sbin/pmc/pmc.c4
-rw-r--r--usr.sbin/pmc/pmc_util.c5
8 files changed, 9 insertions, 38 deletions
diff --git a/usr.sbin/pmc/Makefile b/usr.sbin/pmc/Makefile
index 8f026f131a8b..02292917ab57 100644
--- a/usr.sbin/pmc/Makefile
+++ b/usr.sbin/pmc/Makefile
@@ -1,19 +1,10 @@
-#
-# $FreeBSD$
-#
-
.include <src.opts.mk>
+
PROG_CXX= pmc
MAN=
-WARNS?= 3
-CXXFLAGS+= -O0
-CXXSTD= c++14
CWARNFLAGS.gcc+= -Wno-redundant-decls
CFLAGS+= -I${SRCTOP}/lib/libpmcstat
-# Does not link when built position-independent.
-MK_PIE=no
-
LIBADD= pmc m pmcstat elf
SRCS= pmc.c pmc_util.c cmd_pmc_stat.c \
diff --git a/usr.sbin/pmc/cmd_pmc.h b/usr.sbin/pmc/cmd_pmc.h
index cdec055a2036..83c279c4e8b7 100644
--- a/usr.sbin/pmc/cmd_pmc.h
+++ b/usr.sbin/pmc/cmd_pmc.h
@@ -1,5 +1,5 @@
/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ * SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2018, Matthew Macy
*
@@ -24,8 +24,6 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD$
- *
*/
#ifndef _CMD_PMC_H_
#define _CMD_PMC_H_
diff --git a/usr.sbin/pmc/cmd_pmc_filter.cc b/usr.sbin/pmc/cmd_pmc_filter.cc
index 07027cb272f9..11ab2dc3c964 100644
--- a/usr.sbin/pmc/cmd_pmc_filter.cc
+++ b/usr.sbin/pmc/cmd_pmc_filter.cc
@@ -1,5 +1,5 @@
/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ * SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2018, Matthew Macy
*
@@ -26,9 +26,6 @@
*
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <sys/param.h>
#include <sys/cpuset.h>
#include <sys/event.h>
@@ -208,7 +205,7 @@ pmc_filter_handler(uint32_t *lwplist, int lwpcount, uint32_t *pidlist, int pidco
char cpuid[PMC_CPUID_LEN];
char *proclist[LIST_MAX];
char *threadlist[LIST_MAX];
- int i, pmccount, copies, eventcount;
+ int i, pmccount, eventcount;
int proccount, threadcount;
uint32_t idx;
idmap pidmap, tidmap;
@@ -247,7 +244,6 @@ pmc_filter_handler(uint32_t *lwplist, int lwpcount, uint32_t *pidlist, int pidco
pmclog_close(ps);
if ((ps = static_cast < struct pmclog_parse_state *>(pmclog_open(infd)))== NULL)
errx(EX_OSERR, "ERROR: Cannot allocate pmclog parse state: %s\n", strerror(errno));
- copies = 0;
while (pmclog_read(ps, &ev) == 0) {
if (ev.pl_type == PMCLOG_TYPE_THR_CREATE)
tidmap[ev.pl_u.pl_tc.pl_tid] = ev.pl_u.pl_tc.pl_tdname;
diff --git a/usr.sbin/pmc/cmd_pmc_list.c b/usr.sbin/pmc/cmd_pmc_list.c
index 2e1117e326e6..a1da6a8e732d 100644
--- a/usr.sbin/pmc/cmd_pmc_list.c
+++ b/usr.sbin/pmc/cmd_pmc_list.c
@@ -1,5 +1,5 @@
/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ * SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2018, Matthew Macy
*
@@ -26,9 +26,6 @@
*
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <sys/param.h>
#include <sys/cpuset.h>
#include <sys/event.h>
diff --git a/usr.sbin/pmc/cmd_pmc_stat.c b/usr.sbin/pmc/cmd_pmc_stat.c
index 55d1f1ca7a3b..1e5c14e61857 100644
--- a/usr.sbin/pmc/cmd_pmc_stat.c
+++ b/usr.sbin/pmc/cmd_pmc_stat.c
@@ -1,5 +1,5 @@
/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ * SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2018, Matthew Macy
*
@@ -26,9 +26,6 @@
*
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <sys/param.h>
#include <sys/cpuset.h>
#include <sys/event.h>
diff --git a/usr.sbin/pmc/cmd_pmc_summary.cc b/usr.sbin/pmc/cmd_pmc_summary.cc
index 16edc5c7c30e..610c1fee7f0d 100644
--- a/usr.sbin/pmc/cmd_pmc_summary.cc
+++ b/usr.sbin/pmc/cmd_pmc_summary.cc
@@ -1,5 +1,5 @@
/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ * SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2018, Matthew Macy
*
@@ -26,9 +26,6 @@
*
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <sys/param.h>
#include <sys/cpuset.h>
#include <sys/event.h>
diff --git a/usr.sbin/pmc/pmc.c b/usr.sbin/pmc/pmc.c
index a923e5c0c2a4..4b4d113e2bd4 100644
--- a/usr.sbin/pmc/pmc.c
+++ b/usr.sbin/pmc/pmc.c
@@ -1,5 +1,5 @@
/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ * SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2018, Matthew Macy
*
@@ -24,8 +24,6 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD$
- *
*/
#include <sys/types.h>
diff --git a/usr.sbin/pmc/pmc_util.c b/usr.sbin/pmc/pmc_util.c
index 94f82a49ef36..40f2b9caeef3 100644
--- a/usr.sbin/pmc/pmc_util.c
+++ b/usr.sbin/pmc/pmc_util.c
@@ -1,5 +1,5 @@
/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ * SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2003-2008, Joseph Koshy
* Copyright (c) 2007 The FreeBSD Foundation
@@ -31,9 +31,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <sys/param.h>
#include <sys/cpuset.h>
#include <sys/event.h>