HP Caliper Ktrace Features Guide
1. Capture the trace data again during the last phase of sas.
2. Accurately identify long hold times for vx_recsmp_rangelock.
3. Map lock arg0 into a vx_inode and get its path name.
(This works only for names not pushed out of the DNLC.)
4. Send ktracer data and problem report to the vxfs owner.
5. The support response stated that the performance degradation was due to the
need for a larger disk queue size when the OS was upgraded.
6. Run vxtunefs to increase the max_diskq from 1 MB to 2048 MB.
Inserting Trace Points for Kernel Source Code
If you control your own kernel source code that integrates into HP-UX (for example,
as a driver developer or kernel ISV), then you can add a function call to your source
code wherever you have variables you would like to trace. For example, in your code
where you would like to add:
printf("%lx %lx %lx %lx\n", __LINE__, lbolt, u.u_error, buf)
you can instead add:
kt_dbg(__LINE__, lbolt, u.u_error, buf)
ktracer captures the first four arguments whenever it traces a function call. So, when
you trace the kt_dbg() function, you would see the value of _LINE_, lbolt,
u.u_error, and buf passed in each time kt_dbg() is called. The value of __LINE__
will be listed in the arg0 column, lbolt in the arg1 column, u.u_error in the arg2
column, and buf in the arg3 column of the ktracedump output. Run the following
to trace a workload of yours that calls kt_dbg(), and view trace.out to see the
values:
ktracer -a kt_dbg -D '-a' -w workload > trace.out
You can use kt_dbg() like a printf command for 0 to 4 scalar variables with the
following benefits over printf:
• lower runtime performance cost
• does not flood the console
• searchable
• column-aligned output, adjustable with -Jargn%fmt
On a separate note, if ktracer -a your_func complains that your_func() is a
leaf function that cannot be traced, then within your_func() insert a function call to
kt_dbg(), and your_func() will no longer be a leaf function.
Example Troubleshooting a Performance Problem 25