MFC
This commit is contained in:
commit
a9ff18a210
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/largeSMP/; revision=222209
@ -1542,7 +1542,8 @@ copy_object (bfd *ibfd, bfd *obfd)
|
||||
/* Umm, not sure what to do in this case. */
|
||||
debuglink_vma = 0x1000;
|
||||
|
||||
bfd_set_section_vma (obfd, gnu_debuglink_section, debuglink_vma);
|
||||
(void) bfd_set_section_vma (obfd, gnu_debuglink_section,
|
||||
debuglink_vma);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9701,7 +9701,7 @@ process_archive (char *file_name, FILE *file)
|
||||
}
|
||||
|
||||
if ((longnames_size & 1) != 0)
|
||||
getc (file);
|
||||
(void) getc (file);
|
||||
|
||||
got = fread (&arhdr, 1, sizeof arhdr, file);
|
||||
if (got != sizeof arhdr)
|
||||
|
@ -593,7 +593,7 @@ print_strings (const char *filename, FILE *stream, file_off address,
|
||||
case 8:
|
||||
#if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2)
|
||||
if (sizeof (start) > sizeof (long))
|
||||
printf ("%7Lo ", (unsigned long long) start);
|
||||
printf ("%7llo ", (unsigned long long) start);
|
||||
else
|
||||
#else
|
||||
# if !BFD_HOST_64BIT_LONG
|
||||
@ -608,7 +608,7 @@ print_strings (const char *filename, FILE *stream, file_off address,
|
||||
case 10:
|
||||
#if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2)
|
||||
if (sizeof (start) > sizeof (long))
|
||||
printf ("%7Ld ", (unsigned long long) start);
|
||||
printf ("%7lld ", (unsigned long long) start);
|
||||
else
|
||||
#else
|
||||
# if !BFD_HOST_64BIT_LONG
|
||||
@ -623,7 +623,7 @@ print_strings (const char *filename, FILE *stream, file_off address,
|
||||
case 16:
|
||||
#if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2)
|
||||
if (sizeof (start) > sizeof (long))
|
||||
printf ("%7Lx ", (unsigned long long) start);
|
||||
printf ("%7llx ", (unsigned long long) start);
|
||||
else
|
||||
#else
|
||||
# if !BFD_HOST_64BIT_LONG
|
||||
|
@ -30,7 +30,7 @@ extern char *input_line_pointer; /* -> char we are parsing now. */
|
||||
|
||||
#ifdef PERMIT_WHITESPACE
|
||||
#define SKIP_WHITESPACE() \
|
||||
((*input_line_pointer == ' ') ? ++input_line_pointer : 0)
|
||||
do { if (*input_line_pointer == ' ') ++input_line_pointer; } while (0)
|
||||
#else
|
||||
#define SKIP_WHITESPACE() know(*input_line_pointer != ' ' )
|
||||
#endif
|
||||
|
@ -345,7 +345,7 @@ record_alignment (/* Segment to which alignment pertains. */
|
||||
return;
|
||||
|
||||
if ((unsigned int) align > bfd_get_section_alignment (stdoutput, seg))
|
||||
bfd_set_section_alignment (stdoutput, seg, align);
|
||||
(void) bfd_set_section_alignment (stdoutput, seg, align);
|
||||
}
|
||||
|
||||
int
|
||||
@ -2247,7 +2247,7 @@ relax_segment (struct frag *segment_frag_root, segT segment, int pass)
|
||||
|
||||
newf = frag_alloc (ob);
|
||||
obstack_blank_fast (ob, fragP->fr_var);
|
||||
obstack_finish (ob);
|
||||
(void) obstack_finish (ob);
|
||||
memcpy (newf, fragP, SIZEOF_STRUCT_FRAG);
|
||||
memcpy (newf->fr_literal,
|
||||
fragP->fr_literal + fragP->fr_fix,
|
||||
|
@ -4274,9 +4274,10 @@ lang_size_sections_1
|
||||
" section %s\n"), os->name);
|
||||
|
||||
input = os->children.head->input_section.section;
|
||||
bfd_set_section_vma (os->bfd_section->owner,
|
||||
os->bfd_section,
|
||||
bfd_section_vma (input->owner, input));
|
||||
(void) bfd_set_section_vma (os->bfd_section->owner,
|
||||
os->bfd_section,
|
||||
bfd_section_vma (input->owner,
|
||||
input));
|
||||
os->bfd_section->size = input->size;
|
||||
break;
|
||||
}
|
||||
@ -4361,7 +4362,7 @@ lang_size_sections_1
|
||||
os->name, (unsigned long) (newdot - savedot));
|
||||
}
|
||||
|
||||
bfd_set_section_vma (0, os->bfd_section, newdot);
|
||||
(void) bfd_set_section_vma (0, os->bfd_section, newdot);
|
||||
|
||||
os->bfd_section->output_offset = 0;
|
||||
}
|
||||
|
@ -12442,7 +12442,7 @@ distribute_notes (rtx notes, rtx from_insn, rtx i3, rtx i2, rtx elim_i2,
|
||||
REG_N_DEATHS (REGNO (XEXP (note, 0)))++;
|
||||
|
||||
REG_NOTES (place2) = gen_rtx_fmt_ee (GET_CODE (note),
|
||||
REG_NOTE_KIND (note),
|
||||
GET_MODE (note),
|
||||
XEXP (note, 0),
|
||||
REG_NOTES (place2));
|
||||
}
|
||||
|
@ -3210,7 +3210,7 @@ try_split (rtx pat, rtx trial, int last)
|
||||
{
|
||||
if (CALL_P (insn))
|
||||
REG_NOTES (insn)
|
||||
= gen_rtx_EXPR_LIST (REG_NOTE_KIND (note),
|
||||
= gen_rtx_EXPR_LIST (GET_MODE (note),
|
||||
XEXP (note, 0),
|
||||
REG_NOTES (insn));
|
||||
insn = PREV_INSN (insn);
|
||||
@ -3223,7 +3223,7 @@ try_split (rtx pat, rtx trial, int last)
|
||||
{
|
||||
if (JUMP_P (insn))
|
||||
REG_NOTES (insn)
|
||||
= gen_rtx_EXPR_LIST (REG_NOTE_KIND (note),
|
||||
= gen_rtx_EXPR_LIST (GET_MODE (note),
|
||||
XEXP (note, 0),
|
||||
REG_NOTES (insn));
|
||||
insn = PREV_INSN (insn);
|
||||
@ -4589,7 +4589,8 @@ set_unique_reg_note (rtx insn, enum reg_note kind, rtx datum)
|
||||
return note;
|
||||
}
|
||||
|
||||
REG_NOTES (insn) = gen_rtx_EXPR_LIST (kind, datum, REG_NOTES (insn));
|
||||
REG_NOTES (insn) = gen_rtx_EXPR_LIST ((enum machine_mode) kind, datum,
|
||||
REG_NOTES (insn));
|
||||
return REG_NOTES (insn);
|
||||
}
|
||||
|
||||
@ -5344,12 +5345,12 @@ emit_copy_of_insn_after (rtx insn, rtx after)
|
||||
{
|
||||
if (GET_CODE (link) == EXPR_LIST)
|
||||
REG_NOTES (new)
|
||||
= copy_insn_1 (gen_rtx_EXPR_LIST (REG_NOTE_KIND (link),
|
||||
= copy_insn_1 (gen_rtx_EXPR_LIST (GET_MODE (link),
|
||||
XEXP (link, 0),
|
||||
REG_NOTES (new)));
|
||||
else
|
||||
REG_NOTES (new)
|
||||
= copy_insn_1 (gen_rtx_INSN_LIST (REG_NOTE_KIND (link),
|
||||
= copy_insn_1 (gen_rtx_INSN_LIST (GET_MODE (link),
|
||||
XEXP (link, 0),
|
||||
REG_NOTES (new)));
|
||||
}
|
||||
|
@ -4008,22 +4008,19 @@ stack_protect_epilogue (void)
|
||||
|
||||
/* Allow the target to compare Y with X without leaking either into
|
||||
a register. */
|
||||
switch (HAVE_stack_protect_test != 0)
|
||||
if (HAVE_stack_protect_test != 0)
|
||||
{
|
||||
case 1:
|
||||
tmp = gen_stack_protect_test (x, y, label);
|
||||
if (tmp)
|
||||
{
|
||||
emit_insn (tmp);
|
||||
break;
|
||||
goto done;
|
||||
}
|
||||
/* FALLTHRU */
|
||||
|
||||
default:
|
||||
emit_cmp_and_jump_insns (x, y, EQ, NULL_RTX, ptr_mode, 1, label);
|
||||
break;
|
||||
}
|
||||
|
||||
emit_cmp_and_jump_insns (x, y, EQ, NULL_RTX, ptr_mode, 1, label);
|
||||
done:
|
||||
|
||||
/* The noreturn predictor has been moved to the tree level. The rtl-level
|
||||
predictors estimate this branch about 20%, which isn't enough to get
|
||||
things moved out of line. Since this is the only extant case of adding
|
||||
|
@ -118,7 +118,7 @@ static tree maybe_lookup_decl_in_outer_ctx (tree, omp_context *);
|
||||
/* Find an OpenMP clause of type KIND within CLAUSES. */
|
||||
|
||||
static tree
|
||||
find_omp_clause (tree clauses, enum tree_code kind)
|
||||
find_omp_clause (tree clauses, enum omp_clause_code kind)
|
||||
{
|
||||
for (; clauses ; clauses = OMP_CLAUSE_CHAIN (clauses))
|
||||
if (OMP_CLAUSE_CODE (clauses) == kind)
|
||||
|
@ -2854,7 +2854,7 @@ bsi_insert_before (block_stmt_iterator *i, tree t, enum bsi_iterator_update m)
|
||||
{
|
||||
set_bb_for_stmt (t, i->bb);
|
||||
update_modified_stmts (t);
|
||||
tsi_link_before (&i->tsi, t, m);
|
||||
tsi_link_before (&i->tsi, t, (enum tsi_iterator_update) m);
|
||||
}
|
||||
|
||||
|
||||
@ -2867,7 +2867,7 @@ bsi_insert_after (block_stmt_iterator *i, tree t, enum bsi_iterator_update m)
|
||||
{
|
||||
set_bb_for_stmt (t, i->bb);
|
||||
update_modified_stmts (t);
|
||||
tsi_link_after (&i->tsi, t, m);
|
||||
tsi_link_after (&i->tsi, t, (enum tsi_iterator_update) m);
|
||||
}
|
||||
|
||||
|
||||
|
@ -487,7 +487,7 @@ vect_pattern_recog_1 (
|
||||
}
|
||||
else
|
||||
{
|
||||
enum tree_code vec_mode;
|
||||
enum machine_mode vec_mode;
|
||||
enum insn_code icode;
|
||||
optab optab;
|
||||
|
||||
|
@ -149,7 +149,7 @@ char *realloc ();
|
||||
# include <string.h>
|
||||
# ifndef bzero
|
||||
# ifndef _LIBC
|
||||
# define bzero(s, n) (memset (s, '\0', n), (s))
|
||||
# define bzero(s, n) ((void) (memset (s, '\0', n), (s)))
|
||||
# else
|
||||
# define bzero(s, n) __bzero (s, n)
|
||||
# endif
|
||||
|
@ -75,6 +75,8 @@ options INVARIANT_SUPPORT # Extra sanity checks of internal structures, require
|
||||
options WITNESS # Enable checks to detect deadlocks and cycles
|
||||
options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed
|
||||
options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones
|
||||
options KTR
|
||||
options KTR_CPUMASK=("0x3")
|
||||
|
||||
# Make an SMP-capable kernel by default
|
||||
options SMP # Symmetric MultiProcessor Kernel
|
||||
|
@ -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,6 +50,7 @@ __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>
|
||||
@ -659,6 +660,41 @@ 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,8 +40,10 @@ __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>
|
||||
@ -68,10 +70,6 @@ __FBSDID("$FreeBSD$");
|
||||
#define KTR_MASK (0)
|
||||
#endif
|
||||
|
||||
#ifndef KTR_CPUMASK
|
||||
#define KTR_CPUMASK (~0)
|
||||
#endif
|
||||
|
||||
#ifndef KTR_TIME
|
||||
#define KTR_TIME get_cyclecount()
|
||||
#endif
|
||||
@ -84,10 +82,10 @@ FEATURE(ktr, "Kernel support for KTR kernel tracing facility");
|
||||
|
||||
SYSCTL_NODE(_debug, OID_AUTO, ktr, CTLFLAG_RD, 0, "KTR options");
|
||||
|
||||
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");
|
||||
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_mask = KTR_MASK;
|
||||
TUNABLE_INT("debug.ktr.mask", &ktr_mask);
|
||||
@ -198,6 +196,7 @@ 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;
|
||||
@ -212,8 +211,16 @@ 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 (((1 << cpu) & ktr_cpumask) == 0)
|
||||
if (!CPU_ISSET(cpu, &intern_cpumask))
|
||||
return;
|
||||
#if defined(KTR_VERBOSE) || defined(KTR_ALQ)
|
||||
td = curthread;
|
||||
|
@ -85,7 +85,9 @@ 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,6 +216,7 @@ 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,7 +107,6 @@ 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