summaryrefslogtreecommitdiffstats
path: root/sys/sys/ktr.h
Commit message (Collapse)AuthorAgeFilesLines
* MFC 283546:jhb2015-06-131-1/+2
| | | | Add KTR tracing for some MI ptrace events.
* - Add new machine parsable KTR macros for timing events.jeff2012-12-191-0/+44
| | | | | | | - Use this new format to automatically handle syscalls and VOPs. This changes the earlier format but is still human readable. Sponsored by: EMC / Isilon Storage Division
* - Implement run-time expansion of the KTR buffer via sysctl.jeff2012-11-151-1/+1
| | | | | | | | | | - Implement a function to ensure that all preempted threads have switched back out at least once. Use this to make sure there are no stale references to the old ktr_buf or the lock profiling buffers before updating them. Reviewed by: marius (sparc64 parts), attilio (earlier patch) Sponsored by: EMC / Isilon Storage Division
* Fix KTR_CPUMASK in order to accept a string representing a cpuset_t.attilio2011-05-311-1/+4
| | | | | | | | | | | | This introduce all the underlying support for making this possible (via the function cpusetobj_strscan() and keeps ktr_cpumask exported. sparc64 implements its own assembly primitives for tracing events and needs to properly check it. Anyway the sparc64 logic is not implemented yet due to lack of knowledge (by me) and time (by marius), but it is just a matter of using ktr_cpumask when possible. Tested and fixed by: pluknet Reviewed by: marius
* Revert a change that crept in during MFC.attilio2011-05-311-4/+1
|
* MFCattilio2011-05-311-1/+4
|\
* | Revert a patch that unvolountary sneaked in while I was MFCing.attilio2011-05-231-0/+1
| |
* | MFCattilio2011-05-231-1/+0
|/
* Remove extra commas from KTR_EVENT4() macro to match number of CTR6() args.mav2010-07-241-1/+1
| | | | | Comparing to other macros there should be strings concatenation, not a separate arguments.
* KTR_CTx are long time aliased by existing classes so they can't serveattilio2010-07-211-13/+0
| | | | | | | | their purpose anymore. Axe them out. Sponsored by: Sandvine Incorporated Discussed with: jhb, emaste Possible MFC: TBD
* In non-debugging mode make this define (void)0 instead of nothing. Thisrdivacky2009-06-211-7/+7
| | | | | | | | | | helps to catch bugs like the below with clang. if (cond); <--- note the trailing ; something(); Approved by: ed (mentor) Discussed on: current@
* Grab KTR_SPARE1 and KTR_SPARE5 for KTR_INET and KTR_INET6bms2009-04-291-5/+5
| | | | | | | respectively, as placeholder for future use of CTR() by the networking code (MLDv2 will be going in shortly). Mark KTR_SPARE* as being used in fact by cxgb (picked up on a 'make universe' run).
* - Implement generic macros for producing KTR records that are compatiblejeff2009-01-171-0/+89
| | | | | | | | | | | | with src/tools/sched/schedgraph.py. This allows developers to quickly create a graphical view of ktr data for any resource in the system. - Add sched_tdname() and the pcpu field 'name' for quickly and uniformly identifying records associated with a thread or cpu. - Reimplement the KTR_SCHED traces using the new generic facility. Obtained from: attilio Discussed with: jhb Sponsored by: Nokia
* Axe KTR_ALQ_MASK now that KTR_WITNESS is off unless you hack an #ifdefjhb2006-01-251-3/+0
| | | | | in subr_witness.c. I did add a comment in subr_witness.c noting that KTR_WITNESS is incompatible with KTR_ALQ.
* - Add a new KTR_SUBSYS in place of KTR_SPARE1 to serve as a subsystemjhb2006-01-241-2/+7
| | | | | | | placeholder similar to KTR_DEV. Explain the use of KTR_DEV and KTR_SUBSYS in a comment as well. - Retire KTR_WITNESS and instead have KTR_WITNESS default to off but use KTR_SUBSYS if it is enabled.
* Clean up unused or poorly utilized KTR values. Remove KTR_FS, KTR_KGDB,njl2005-12-171-12/+12
| | | | | | | and KTR_IO as they were never used. Remove KTR_CLK since it was only used for hardclock firing and use KTR_INTR there instead. Remove KTR_CRITICAL since it was only used for crit enter/exit and use KTR_CONTENTION instead.
* Extend the scope of #ifndef LOCORE to also cover the prototype ofmarius2005-12-061-3/+7
| | | | | | | | | | | ktr_tracepoint() and the macros using it. This allows this header to be included in .S files for obtaining the KTR_* class macros directly and providing a default value for KTR_COMPILE in case it's not specified in the kernel config file including defining it to 0 when not using 'options KTR' at all. Requested by: ru Reviewed by: ru
* Change default KTR_COMPILE from KTR_GEN to KTR_ALL, to match withglebius2005-09-021-1/+1
| | | | | | manual page. Reviewed by: jhb, pjd
* - Replace the unused KTR_NFS with KTR_VFS. KTR_VFS differs from KTR_VOPjeff2005-06-111-2/+2
| | | | | | in that KTR_VFS will be hand placed, while KTR_VOP traces the individual vnode operations and is generated by vnode_if.awk. - Add a comment describing KTR_VOP.
* - I broke binary compat. update KTR_VERSION.jeff2005-06-101-1/+1
| | | | Spotted by: jhb
* - Add curthread to the state that ktr is saving. The extra information isjeff2005-06-101-0/+1
| | | | | | | | well worth the bloat. - Change the formatting of 'show ktr' slightly to accommodate the additional field. Remove a tab from the verbose output and place the actual trace data after a : so it is more easy to understand which part is the event and which is part of the record.
* Addendum to netchild's C compiler abstraction mega-patch which somehowjoerg2005-03-041-9/+0
| | | | | | have been forgotten in my previous commit. Submitted by: netchild
* - Somehow I mangled KTR_CRITICAL.jeff2005-01-241-1/+1
| | | | Spotted by: ru
* - Add a new KTR class for the buffer cache.jeff2005-01-241-2/+3
|
* - Add KTR_SCHED to produce ktr data for sys/tools/sched/schedgraph.py.jeff2004-12-261-2/+3
|
* Add basic critical section tracing to KTR using event type KTR_CRITICAL.rwatson2004-11-071-1/+2
| | | | | | | | This generates a KTR event for each critical section entered and exited. It would be desirable to also log the filename and line number of the source entering or exiting the critical section, but this requires hacking up the critical section API, so I've not done that yet.
* Add some basic KTR tracing to busdma on i386. This is likely notrwatson2004-10-231-1/+2
| | | | | | | | | the final set of traces -- someone with more busdma background will probably want to review and expand this, as well as port to other platforms. This tracing is sufficient to identify key busdma events on i386, and in particular to draw attention to bounce buffering events that may have a substantial performance impact.
* Add KTR_GEOM, which allows tracing of basic GEOM I/O events occuringrwatson2004-10-211-1/+2
| | | | | | in the g_up and g_down threads. Each time a bio is propelled up and down the stack, an event is generating showing the provider, offset, and length, as well as thread wakeup and work status information.
* Assign KTR flag constants for UMA events and callouts.rwatson2004-08-061-1/+3
|
* Retire the KTR_LOCKMGR bit and use it to log eventhandler messagesjhb2003-03-111-1/+1
| | | | instead as KTR_EVH.
* - Add support for logging KTR via ALQ. This is optional and enabled by thejeff2002-09-221-0/+3
| | | | KTR_ALQ config option.
* Add a new KTR type KTR_CONTENTION, and use it in the mutex code toiedowse2002-08-261-1/+2
| | | | | | | | log the start and end of periods during which mtx_lock() is waiting to acquire a sleep mutex. The log message includes the file and line of both the waiter and the holder. Reviewed by: jhb, jake
* KTR_CT* had one too many trailing zeroes, making KTR_CT5-8 too large forjake2002-06-231-8/+8
| | | | ktr_mask.
* Wrap the arguments to CTR6() in parentheses so that the u_long casts workjhb2002-04-011-2/+2
| | | | properly for arguments that are expressions.
* ktr changes to improve performance and make writing a userland utility tojake2002-04-011-51/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix two typos, TR6() and ITR6() need to use CTR6(), not CTR5().jhb2001-12-141-2/+2
|
* Complete the CTR6 addition (and TR6 and ITR6...)obrien2001-12-101-11/+11
|
* Add a CTR6, we need it now.obrien2001-12-101-0/+8
|
* Add a hack to get around the fact that egcs 1.1.2 (which I'm using to buildbenno2001-10-151-0/+9
| | | | my powerpc kernels on NetBSD/macppc 1.5) doesn't know of the __func__ macro.
* - Replace the unused KTR_IDLELOOP trace class with a new KTR_WITNESS tracejhb2001-06-251-9/+6
| | | | | | | | | | | | | | 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.
* Add a new psuedo-KTR trace level KTR_ALL which is a mask of all currentlyjhb2001-06-041-0/+1
| | | | used KTR levels.
* - In the KTR_EXTEND case, use a const char * to point to the passed injhb2001-02-201-9/+6
| | | | | | 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.
* - Axe unused macros used by BSD/OS in assembly for KTR tracing.jhb2001-02-201-7/+1
| | | | | - Add a __printflike() tag to ktr_tracepoint() in the KTR_EXTEND case to verify the arguments passed to KTR tracepoints.
* Implement a unified run queue and adjust priority levels accordingly.jake2001-02-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - All processes go into the same array of queues, with different scheduling classes using different portions of the array. This allows user processes to have their priorities propogated up into interrupt thread range if need be. - I chose 64 run queues as an arbitrary number that is greater than 32. We used to have 4 separate arrays of 32 queues each, so this may not be optimal. The new run queue code was written with this in mind; changing the number of run queues only requires changing constants in runq.h and adjusting the priority levels. - The new run queue code takes the run queue as a parameter. This is intended to be used to create per-cpu run queues. Implement wrappers for compatibility with the old interface which pass in the global run queue structure. - Group the priority level, user priority, native priority (before propogation) and the scheduling class into a struct priority. - Change any hard coded priority levels that I found to use symbolic constants (TTIPRI and TTOPRI). - Remove the curpriority global variable and use that of curproc. This was used to detect when a process' priority had lowered and it should yield. We now effectively yield on every interrupt. - Activate propogate_priority(). It should now have the desired effect without needing to also propogate the scheduling class. - Temporarily comment out the call to vm_page_zero_idle() in the idle loop. It interfered with propogate_priority() because the idle process needed to do a non-blocking acquire of Giant and then other processes would try to propogate their priority onto it. The idle process should not do anything except idle. vm_page_zero_idle() will return in the form of an idle priority kernel thread which is woken up at apprioriate times by the vm system. - Update struct kinfo_proc to the new priority interface. Deliberately change its size by adjusting the spare fields. It remained the same size, but the layout has changed, so userland processes that use it would parse the data incorrectly. The size constraint should really be changed to an arbitrary version number. Also add a debug.sizeof sysctl node for struct kinfo_proc.
* - Remove much of the inlining of the KTR tracepoints into a ktr_tracepoint()jhb2000-11-071-136/+29
| | | | | | | | | | | | | | | | | | function declared in kern_ktr.c. The only inline checks left are the checks that compare KTR_COMPILE with the supplied mask and thus should be optimized away into either nothing or a direct call to ktr_tracepoint(). - Move several KTR-related options to opt_ktr.h now that they are only needed by kern_ktr.c and not by ktr.h. - Add in the ktr_verbose functionality if KTR_EXTEND is turned on. If the global variable 'ktr_verbose' is non-zero, then KTR messages will be dumped to the console. This variable can be set by either kernel code or via the 'debug.ktr_verbose' sysctl. It defaults to off unless the KTR_VERBOSE kernel option is specified in which case it defaults to on. This can be useful when the machine locks up spinning in a loop with interrupts disabled as you might be able to see what it is doing when it locks up. Requested by: phk
* Remove an evil conditional nested include of <sys/systm.h>phk2000-10-301-1/+0
|
* Convert lockmgr locks from using simple locks to using mutexes.jasone2000-10-041-0/+1
| | | | | | Add lockdestroy() and appropriate invocations, which corresponds to lockinit() and must be called to clean up after a lockmgr lock is no longer needed.
* Change "KTR_COMPILE & m" to "KTR_COMPILE & (m)" to allow more flexibledfr2000-09-141-12/+12
| | | | expressions for m.
* Use '&' instead of '%' to calculate the new value for ktr_idx.dfr2000-09-101-2/+2
|
* Add KTR, a facility that logs kernel events in order to to facilitatejasone2000-09-071-0/+319
debugging. Acquired from: BSDi (BSD/OS) Submitted by: dfr, grog, jake, jhb
OpenPOWER on IntegriCloud