History log of /freebsd/sys/kern/kern_ktr.c (Results 101 – 125 of 192)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 5e26dcb5 09-Jun-2003 John Baldwin <jhb@FreeBSD.org>

- Add a td_pflags field to struct thread for private flags accessed only by
curthread. Unlike td_flags, this field does not need any locking.
- Replace the td_inktr and td_inktrace variables with

- Add a td_pflags field to struct thread for private flags accessed only by
curthread. Unlike td_flags, this field does not need any locking.
- Replace the td_inktr and td_inktrace variables with equivalent private
thread flags.
- Move TDF_OLDMASK over to the private flags field so it no longer requires
sched_lock.

show more ...


Revision tags: release/5.1.0_cvs, release/5.1.0
# b1ac98d8 02-May-2003 Julian Elischer <julian@FreeBSD.org>

Move the flag that indicates an idle thread from the KSE to the thread.
It was always referenced via the thread anyhow.

Reviewed by: jhb (a LOOOOONG time ago)


Revision tags: release/4.8.0_cvs, release/4.8.0
# 4c6ffc94 11-Mar-2003 John Baldwin <jhb@FreeBSD.org>

Trim leading "../" sequences from filenames.


# fc718df7 23-Feb-2003 Jake Burkholder <jake@FreeBSD.org>

Add a /a modifier to the show ktr ddb command, which prints the whole trace
buffer without stopping. Useful if you just want to capture the output but
can't run ktrdump.


Revision tags: release/5.0.0_cvs, release/5.0.0, release/4.7.0_cvs
# a414302f 26-Sep-2002 Jeff Roberson <jeff@FreeBSD.org>

- Export the alq daemon thread pointer.
- Don't log ktr events from the alq daemon.


# abee588b 22-Sep-2002 Jeff Roberson <jeff@FreeBSD.org>

- Add support for logging KTR via ALQ. This is optional and enabled by the
KTR_ALQ config option.


Revision tags: release/4.6.2_cvs, release/4.6.2, release/4.6.1, release/4.6.0_cvs
# 98281c99 06-Apr-2002 Jake Burkholder <jake@FreeBSD.org>

Remove a stale comment.


# a9f5d338 06-Apr-2002 Jake Burkholder <jake@FreeBSD.org>

Include machine/ktr.h for sparc64 so we pick up KTR_CPU.


# 60a57b73 01-Apr-2002 Jake Burkholder <jake@FreeBSD.org>

ktr changes to improve performance and make writing a userland utility to
dump the trace buffer feasible.
- Remove KTR_EXTEND. This changes the format of the trace entries when
activated, making w

ktr changes to improve performance and make writing a userland utility to
dump the trace buffer feasible.
- Remove KTR_EXTEND. This changes the format of the trace entries when
activated, making writing a userland tool which is not tied to a specific
kernel configuration difficult.
- Use get_cyclecount() for timestamps. nanotime() is much too heavy weight
and requires recursion protection due to ktr traces occuring as a result
of ktr traces. KTR_VERBOSE may still require recursion protection, which
is now conditional on it.
- Allow KTR_CPU to be overridden by MD code. This is so that it is possible
to trace early in startup before pcpu and/or curthread are setup.
- Add a version number for the ktr interface. A userland tool can check this
to detect mismatches.
- Use an array for the parameters to make decoding in userland easier.
- Add file and line recording to the non-extended traces now that the extended
version is no more.

These changes will break gdb macros to decode the extended version of the
trace buffer which are floating around. Users of these macros should either
use the show ktr command in ddb, or use the userland utility which can be run
on a core dump.

Approved by: jhb
Tested on: i386, sparc64

show more ...


# c29824db 08-Mar-2002 John Baldwin <jhb@FreeBSD.org>

Read KTR_CPU into a temporary variable so that we use a consistent value
for both the cpumask check and the cpu entry field w/o needing to use
a critical section.


Revision tags: release/4.5.0_cvs, release/4.4.0_cvs
# 5e8af3b3 01-Jan-2002 Jake Burkholder <jake@FreeBSD.org>

Print parm6 too in the !KTR_EXTEND case.


# 7e1f6dfe 18-Dec-2001 John Baldwin <jhb@FreeBSD.org>

Modify the critical section API as follows:
- The MD functions critical_enter/exit are renamed to start with a cpu_
prefix.
- MI wrapper functions critical_enter/exit maintain a per-thread nesting

Modify the critical section API as follows:
- The MD functions critical_enter/exit are renamed to start with a cpu_
prefix.
- MI wrapper functions critical_enter/exit maintain a per-thread nesting
count and a per-thread critical section saved state set when entering
a critical section while at nesting level 0 and restored when exiting
to nesting level 0. This moves the saved state out of spin mutexes so
that interlocking spin mutexes works properly.
- Most low-level MD code that used critical_enter/exit now use
cpu_critical_enter/exit. MI code such as device drivers and spin
mutexes use the MI wrappers. Note that since the MI wrappers store
the state in the current thread, they do not have any return values or
arguments.
- mtx_intr_enable() is replaced with a constant CRITICAL_FORK which is
assigned to curthread->td_savecrit during fork_exit().

Tested on: i386, alpha

show more ...


# 69e94957 13-Dec-2001 John Baldwin <jhb@FreeBSD.org>

Use a per-thread variable for keeping state when a thread is processing
a KTR log entry. Any KTR requests made while working on an entry are
ignored/discarded to prevent recursion. This is a better

Use a per-thread variable for keeping state when a thread is processing
a KTR log entry. Any KTR requests made while working on an entry are
ignored/discarded to prevent recursion. This is a better fix for the
hack to futz with the CPU mask and call getnanotime() if KTR_LOCK or
KTR_WITNESS was on. It also covers the actual formatting of the log entry
including dumping it to the display which the earlier hacks did not.

show more ...


# 0bbc8826 12-Dec-2001 John Baldwin <jhb@FreeBSD.org>

Overhaul the per-CPU support a bit:

- The MI portions of struct globaldata have been consolidated into a MI
struct pcpu. The MD per-CPU data are specified via a macro defined in
machine/pcpu.h.

Overhaul the per-CPU support a bit:

- The MI portions of struct globaldata have been consolidated into a MI
struct pcpu. The MD per-CPU data are specified via a macro defined in
machine/pcpu.h. A macro was chosen over a struct mdpcpu so that the
interface would be cleaner (PCPU_GET(my_md_field) vs.
PCPU_GET(md.md_my_md_field)).
- All references to globaldata are changed to pcpu instead. In a UP kernel,
this data was stored as global variables which is where the original name
came from. In an SMP world this data is per-CPU and ideally private to each
CPU outside of the context of debuggers. This also included combining
machine/globaldata.h and machine/globals.h into machine/pcpu.h.
- The pointer to the thread using the FPU on i386 was renamed from
npxthread to fpcurthread to be identical with other architectures.
- Make the show pcpu ddb command MI with a MD callout to display MD
fields.
- The globaldata_register() function was renamed to pcpu_init() and now
init's MI fields of a struct pcpu in addition to registering it with
the internal array and list.
- A pcpu_destroy() function was added to remove a struct pcpu from the
internal array and list.

Tested on: alpha, i386
Reviewed by: peter, jake

show more ...


# 071087f3 10-Dec-2001 David E. O'Brien <obrien@FreeBSD.org>

Missed an assignment of arg6 in previous commit.


# b45df7b4 10-Dec-2001 David E. O'Brien <obrien@FreeBSD.org>

Adjust for the addition of CTR6.


# 1715f07d 26-Jun-2001 John Baldwin <jhb@FreeBSD.org>

- Replace the unused KTR_IDLELOOP trace class with a new KTR_WITNESS trace
class to trace witness events.
- Make the ktr_cpu field of ktr_entry be a standard field rather than one
present only in

- Replace the unused KTR_IDLELOOP trace class with a new KTR_WITNESS trace
class to trace witness events.
- Make the ktr_cpu field of ktr_entry be a standard field rather than one
present only in the KTR_EXTEND case.
- Move the default definition of KTR_ENTRIES from sys/ktr.h to
kern/kern_ktr.c. It has not been needed in the header file since KTR
was un-inlined.
- Minor include cleanup in kern/kern_ktr.c.
- Fiddle with the ktr_cpumask in ktr_tracepoint() to disable KTR events
on the current CPU while we are processing an event.
- Set the current CPU inside of the critical section to ensure we don't
migrate CPU's after the critical section but before we set the CPU.

show more ...


# f41325db 13-Jun-2001 Peter Wemm <peter@FreeBSD.org>

With this commit, I hereby pronounce gensetdefs past its use-by date.

Replace the a.out emulation of 'struct linker_set' with something
a little more flexible. <sys/linker_set.h> now provides macro

With this commit, I hereby pronounce gensetdefs past its use-by date.

Replace the a.out emulation of 'struct linker_set' with something
a little more flexible. <sys/linker_set.h> now provides macros for
accessing elements and completely hides the implementation.

The linker_set.h macros have been on the back burner in various
forms since 1998 and has ideas and code from Mike Smith (SET_FOREACH()),
John Polstra (ELF clue) and myself (cleaned up API and the conversion
of the rest of the kernel to use it).

The macros declare a strongly typed set. They return elements with the
type that you declare the set with, rather than a generic void *.

For ELF, we use the magic ld symbols (__start_<setname> and
__stop_<setname>). Thanks to Richard Henderson <rth@redhat.com> for the
trick about how to force ld to provide them for kld's.

For a.out, we use the old linker_set struct.

NOTE: the item lists are no longer null terminated. This is why
the code impact is high in certain areas.

The runtime linker has a new method to find the linker set
boundaries depending on which backend format is in use.

linker sets are still module/kld unfriendly and should never be used
for anything that may be modular one day.

Reviewed by: eivind

show more ...


# 09786698 08-Jun-2001 Peter Wemm <peter@FreeBSD.org>

"Fix" the previous initial attempt at fixing TUNABLE_INT(). This time
around, use a common function for looking up and extracting the tunables
from the kernel environment. This saves duplicating th

"Fix" the previous initial attempt at fixing TUNABLE_INT(). This time
around, use a common function for looking up and extracting the tunables
from the kernel environment. This saves duplicating the same function
over and over again. This way typically has an overhead of 8 bytes + the
path string, versus about 26 bytes + the path string.

show more ...


# 4422746f 07-Jun-2001 Peter Wemm <peter@FreeBSD.org>

Back out part of my previous commit. This was a last minute change
and I botched testing. This is a perfect example of how NOT to do
this sort of thing. :-(


# 81930014 07-Jun-2001 Peter Wemm <peter@FreeBSD.org>

Make the TUNABLE_*() macros look and behave more consistantly like the
SYSCTL_*() macros. TUNABLE_INT_DECL() was an odd name because it didn't
actually declare the int, which is what the name sugges

Make the TUNABLE_*() macros look and behave more consistantly like the
SYSCTL_*() macros. TUNABLE_INT_DECL() was an odd name because it didn't
actually declare the int, which is what the name suggests it would do.

show more ...


Revision tags: release/4.3.0_cvs, release/4.3.0
# 0006681f 28-Mar-2001 John Baldwin <jhb@FreeBSD.org>

Switch from save/disable/restore_intr() to critical_enter/exit().


# 62d654c1 20-Feb-2001 John Baldwin <jhb@FreeBSD.org>

- In the KTR_EXTEND case, use a const char * to point to the passed in
filename insteada of copying the first 32 characters of it.
- Add in const modifiers for the passed in format strings and file

- In the KTR_EXTEND case, use a const char * to point to the passed in
filename insteada of copying the first 32 characters of it.
- Add in const modifiers for the passed in format strings and filenames
and their respective members in the ktr_entry struct.

show more ...


# 591faa2e 20-Feb-2001 John Baldwin <jhb@FreeBSD.org>

- Abolish the 'show ktr_first' and 'show ktr_next' commands.
- Add pager capability to the 'show ktr' command. It functions much like
'ps': Enter at the prompt displays one more entry, Space displ

- Abolish the 'show ktr_first' and 'show ktr_next' commands.
- Add pager capability to the 'show ktr' command. It functions much like
'ps': Enter at the prompt displays one more entry, Space displays
another page, and any other key quits.

show more ...


# 1aa97cde 09-Feb-2001 John Baldwin <jhb@FreeBSD.org>

Work around some sizeof(long) != sizeof(int) bogons.


12345678