HP Caliper Ktrace Features Guide
SyMsk - PSR pp/ic/pk/dt/i = pQPDI when on, _ off
The PSR is the Processor Status Register, described in detail in the Itanium System
Architecture manual. The full 64 bit PSR value is captured in each trace record.
To compact a lot of PSR information into just 5 characters of data in the SyMsk column,
ktracedump has adapted the following method, which is subject to future change.
If PSR.pp (priv perf monitor enable) is 1, show ’p’. If 0, show ’_’.
If PSR.ic (interrupt collection) is 1, show ’Q’. If 0, show ’_’.
If PSR.pk (protection key enable) is 1, show ’P’. If 0, show ’_’.
If PSR.dt (data address translation) is 1, show ’D’. If 0, show ’_’.
If PSR.i (external interrupt enable) is 1, show ’I’. If 0, show ’_’.
To illustrate further, seeing the character ’_’ at the end of the SyMsk column would
indicate that external interrupts were disabled when the trace record was captured.
Seeing the character ’I’ would mean the opposite, that interrupts were enabled.
Limitations
Not all functions are traceable. If a function is not traceable, calls to it will not be traced
and no trace records will exist for that untraceable function. A function which is not
traceable will never show in the Function name column, but it might show in the Caller
column. That is, an untraceable function made a procedure call to a traceable function.
The ktracedump -DNF command will report the list of functions selected to trace.
Traces are generated each time an installed function is executed. If a function of interest
is on the traced function list, but you see no traces for it, then one of three possibilities
has occurred:
• The function was not executed while ktracer was active.
• The circular buffers wrapped around after it was executed.
• The function call was inlined by the optimizer.
To eliminate the case of the circular buffers being overwritten, you can do either or
both of the following actions:
• Configure more traces per CPU (ktracer -A numtraces).
• Generate less traces.
To generate less traces, you can try a combinations of these steps:
• Reduce the list of functions to trace:
ktracer -z -m nfs -a my_func2 –B
• Shorten the duration that ktracer is active.
• Trace only one process at a time: ktracer —p pid
Examples
Start tracing all functions, launch a program called workload, halt tracing, and dump a
report to a file named ktrc.out:
Syntax 31