Revert a patch that unvolountary sneaked in while I was MFCing.
This commit is contained in:
parent
a9ff18a210
commit
217e1c0ebc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/largeSMP/; revision=222235
@ -441,7 +441,7 @@ options KTR
|
||||
options KTR_ENTRIES=1024
|
||||
options KTR_COMPILE=(KTR_INTR|KTR_PROC)
|
||||
options KTR_MASK=KTR_INTR
|
||||
options KTR_CPUMASK=("0x3")
|
||||
options KTR_CPUMASK=0x3
|
||||
options KTR_VERBOSE
|
||||
|
||||
#
|
||||
|
@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/cpuset.h>
|
||||
#include <sys/sx.h>
|
||||
#include <sys/queue.h>
|
||||
#include <sys/libkern.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/bus.h>
|
||||
#include <sys/interrupt.h>
|
||||
@ -660,41 +659,6 @@ cpusetobj_strprint(char *buf, const cpuset_t *set)
|
||||
return (buf);
|
||||
}
|
||||
|
||||
/*
|
||||
* Build a valid cpuset_t object from a string representation.
|
||||
* It expects an incoming buffer at least sized as CPUSETBUFSIZ.
|
||||
*/
|
||||
int
|
||||
cpusetobj_strscan(cpuset_t *set, const char *buf)
|
||||
{
|
||||
u_int nwords;
|
||||
int i;
|
||||
|
||||
if (strlen(buf) > CPUSETBUFSIZ - 1)
|
||||
return (-1);
|
||||
|
||||
/* Allow to pass a shorter version of the mask when necessary. */
|
||||
nwords = 1;
|
||||
for (i = 0; buf[i] != '\0'; i++)
|
||||
if (buf[i] == ',')
|
||||
nwords++;
|
||||
if (nwords > _NCPUWORDS)
|
||||
return (-1);
|
||||
|
||||
CPU_ZERO(set);
|
||||
for (i = nwords - 1; i > 0; i--) {
|
||||
if (!sscanf(buf, "%lx, ", &set->__bits[i]))
|
||||
return (-1);
|
||||
buf = strstr(buf, " ");
|
||||
if (buf == NULL)
|
||||
return (-1);
|
||||
buf++;
|
||||
}
|
||||
if (!sscanf(buf, "%lx", &set->__bits[0]))
|
||||
return (-1);
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Apply an anonymous mask to a single thread.
|
||||
*/
|
||||
|
@ -40,10 +40,8 @@ __FBSDID("$FreeBSD$");
|
||||
#include "opt_alq.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/queue.h>
|
||||
#include <sys/alq.h>
|
||||
#include <sys/cons.h>
|
||||
#include <sys/cpuset.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/ktr.h>
|
||||
#include <sys/libkern.h>
|
||||
@ -70,6 +68,10 @@ __FBSDID("$FreeBSD$");
|
||||
#define KTR_MASK (0)
|
||||
#endif
|
||||
|
||||
#ifndef KTR_CPUMASK
|
||||
#define KTR_CPUMASK (~0)
|
||||
#endif
|
||||
|
||||
#ifndef KTR_TIME
|
||||
#define KTR_TIME get_cyclecount()
|
||||
#endif
|
||||
@ -82,10 +84,10 @@ FEATURE(ktr, "Kernel support for KTR kernel tracing facility");
|
||||
|
||||
SYSCTL_NODE(_debug, OID_AUTO, ktr, CTLFLAG_RD, 0, "KTR options");
|
||||
|
||||
static char ktr_cpumask[CPUSETBUFSIZ];
|
||||
TUNABLE_STR("debug.ktr.cpumask", ktr_cpumask, sizeof(ktr_cpumask));
|
||||
SYSCTL_STRING(_debug_ktr, OID_AUTO, cpumask, CTLFLAG_RW, ktr_cpumask,
|
||||
sizeof(ktr_cpumask), "Bitmask of CPUs on which KTR logging is enabled");
|
||||
int ktr_cpumask = KTR_CPUMASK;
|
||||
TUNABLE_INT("debug.ktr.cpumask", &ktr_cpumask);
|
||||
SYSCTL_INT(_debug_ktr, OID_AUTO, cpumask, CTLFLAG_RW,
|
||||
&ktr_cpumask, 0, "Bitmask of CPUs on which KTR logging is enabled");
|
||||
|
||||
int ktr_mask = KTR_MASK;
|
||||
TUNABLE_INT("debug.ktr.mask", &ktr_mask);
|
||||
@ -196,7 +198,6 @@ ktr_tracepoint(u_int mask, const char *file, int line, const char *format,
|
||||
u_long arg1, u_long arg2, u_long arg3, u_long arg4, u_long arg5,
|
||||
u_long arg6)
|
||||
{
|
||||
cpuset_t intern_cpumask;
|
||||
struct ktr_entry *entry;
|
||||
#ifdef KTR_ALQ
|
||||
struct ale *ale = NULL;
|
||||
@ -211,16 +212,8 @@ ktr_tracepoint(u_int mask, const char *file, int line, const char *format,
|
||||
return;
|
||||
if ((ktr_mask & mask) == 0)
|
||||
return;
|
||||
#ifndef KTR_CPUMASK
|
||||
CPU_FILL(&intern_cpumask);
|
||||
#else
|
||||
if (ktr_cpumask[0] == '\0')
|
||||
strncpy(ktr_cpumask, KTR_CPUMASK, sizeof(ktr_cpumask));
|
||||
if (cpusetobj_strscan(&intern_cpumask, ktr_cpumask) == -1)
|
||||
return;
|
||||
#endif
|
||||
cpu = KTR_CPU;
|
||||
if (!CPU_ISSET(cpu, &intern_cpumask))
|
||||
if (((1 << cpu) & ktr_cpumask) == 0)
|
||||
return;
|
||||
#if defined(KTR_VERBOSE) || defined(KTR_ALQ)
|
||||
td = curthread;
|
||||
|
@ -85,9 +85,7 @@ l2: add r2, 1, r3 ; \
|
||||
lduw [PCPU(MID)], r1 ; \
|
||||
mov 1, r2 ; \
|
||||
sllx r2, r1, r1 ; \
|
||||
#if 0
|
||||
TEST(ktr_cpumask, r1, r2, r3, l3) ; \
|
||||
#endif
|
||||
ATR(desc, r1, r2, r3, l1, l2)
|
||||
|
||||
#endif /* LOCORE */
|
||||
|
@ -216,7 +216,6 @@ int cpuset_create_root(struct prison *, struct cpuset **);
|
||||
int cpuset_setproc_update_set(struct proc *, struct cpuset *);
|
||||
int cpusetobj_ffs(const cpuset_t *);
|
||||
char *cpusetobj_strprint(char *, const cpuset_t *);
|
||||
int cpusetobj_strscan(cpuset_t *, const char *);
|
||||
|
||||
#else
|
||||
__BEGIN_DECLS
|
||||
|
@ -107,6 +107,7 @@ struct ktr_entry {
|
||||
u_long ktr_parms[KTR_PARMS];
|
||||
};
|
||||
|
||||
extern int ktr_cpumask;
|
||||
extern int ktr_mask;
|
||||
extern int ktr_entries;
|
||||
extern int ktr_verbose;
|
||||
|
Loading…
Reference in New Issue
Block a user