aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/pmcstat
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/pmcstat')
-rw-r--r--usr.sbin/pmcstat/pmcpl_calltree.c6
-rw-r--r--usr.sbin/pmcstat/pmcstat.c13
-rw-r--r--usr.sbin/pmcstat/pmcstat_log.c8
-rw-r--r--usr.sbin/pmcstat/pmcstat_log.h4
4 files changed, 15 insertions, 16 deletions
diff --git a/usr.sbin/pmcstat/pmcpl_calltree.c b/usr.sbin/pmcstat/pmcpl_calltree.c
index 6b8bc61241e1..3d0127d5a20d 100644
--- a/usr.sbin/pmcstat/pmcpl_calltree.c
+++ b/usr.sbin/pmcstat/pmcpl_calltree.c
@@ -125,7 +125,7 @@ struct pmcpl_ct_node_hash {
STAILQ_ENTRY(pmcpl_ct_node_hash) pch_next;
};
-struct pmcpl_ct_sample pmcpl_ct_callid;
+static struct pmcpl_ct_sample pmcpl_ct_callid;
#define PMCPL_CT_MAXCOL PMC_CALLCHAIN_DEPTH_MAX
#define PMCPL_CT_MAXLINE 1024 /* TODO: dynamic. */
@@ -135,8 +135,8 @@ struct pmcpl_ct_line {
unsigned ln_index;
};
-struct pmcpl_ct_line pmcpl_ct_topmax[PMCPL_CT_MAXLINE+1];
-struct pmcpl_ct_node
+static struct pmcpl_ct_line pmcpl_ct_topmax[PMCPL_CT_MAXLINE+1];
+static struct pmcpl_ct_node
*pmcpl_ct_topscreen[PMCPL_CT_MAXCOL+1][PMCPL_CT_MAXLINE+1];
/*
diff --git a/usr.sbin/pmcstat/pmcstat.c b/usr.sbin/pmcstat/pmcstat.c
index 6808eedab202..cc43b820690d 100644
--- a/usr.sbin/pmcstat/pmcstat.c
+++ b/usr.sbin/pmcstat/pmcstat.c
@@ -105,13 +105,12 @@ __FBSDID("$FreeBSD$");
/* Globals */
-int pmcstat_interrupt = 0;
-int pmcstat_displayheight = DEFAULT_DISPLAY_HEIGHT;
-int pmcstat_displaywidth = DEFAULT_DISPLAY_WIDTH;
-int pmcstat_sockpair[NSOCKPAIRFD];
-int pmcstat_kq;
-kvm_t *pmcstat_kvm;
-struct kinfo_proc *pmcstat_plist;
+int pmcstat_displayheight = DEFAULT_DISPLAY_HEIGHT;
+int pmcstat_displaywidth = DEFAULT_DISPLAY_WIDTH;
+static int pmcstat_sockpair[NSOCKPAIRFD];
+static int pmcstat_kq;
+static kvm_t *pmcstat_kvm;
+static struct kinfo_proc *pmcstat_plist;
struct pmcstat_args args;
static void
diff --git a/usr.sbin/pmcstat/pmcstat_log.c b/usr.sbin/pmcstat/pmcstat_log.c
index e5fee35a1c4d..fdcf9c403702 100644
--- a/usr.sbin/pmcstat/pmcstat_log.c
+++ b/usr.sbin/pmcstat/pmcstat_log.c
@@ -142,7 +142,7 @@ struct pmcstat_image_hash_list pmcstat_image_hash[PMCSTAT_NHASH];
struct pmcstat_process_hash_list pmcstat_process_hash[PMCSTAT_NHASH];
struct pmcstat_stats pmcstat_stats; /* statistics */
-int ps_samples_period; /* samples count between top refresh. */
+static int ps_samples_period; /* samples count between top refresh. */
struct pmcstat_process *pmcstat_kernproc; /* kernel 'process' */
@@ -151,7 +151,7 @@ struct pmcstat_process *pmcstat_kernproc; /* kernel 'process' */
#include "pmcpl_annotate.h"
#include "pmcpl_calltree.h"
-struct pmc_plugins {
+static struct pmc_plugins {
const char *pl_name; /* name */
/* configure */
@@ -218,7 +218,7 @@ struct pmc_plugins {
}
};
-int pmcstat_mergepmc;
+static int pmcstat_mergepmc;
int pmcstat_pmcinfilter = 0; /* PMC filter for top mode. */
float pmcstat_threshold = 0.5; /* Cost filter for top mode. */
@@ -275,7 +275,7 @@ int pmcstat_npmcs;
/*
* PMC Top mode pause state.
*/
-int pmcstat_pause;
+static int pmcstat_pause;
static void
pmcstat_stats_reset(int reset_global)
diff --git a/usr.sbin/pmcstat/pmcstat_log.h b/usr.sbin/pmcstat/pmcstat_log.h
index bfa925c52221..b4ced4d9397b 100644
--- a/usr.sbin/pmcstat/pmcstat_log.h
+++ b/usr.sbin/pmcstat/pmcstat_log.h
@@ -176,8 +176,8 @@ extern int pmcstat_npmcs; /* PMC count. */
/*
* Top mode global options.
*/
-float pmcstat_threshold; /* Threshold to filter node. */
-int pmcstat_pmcinfilter; /* PMC index displayed. */
+extern float pmcstat_threshold; /* Threshold to filter node. */
+extern int pmcstat_pmcinfilter; /* PMC index displayed. */
/* Function prototypes */
const char *pmcstat_pmcid_to_name(pmc_id_t _pmcid);