-------------------- Release 2.0.1 Errata -------------------- The following bugs were fixed from release 2.0 of the KernInst Tool Suite: Cross-Platform Fixes -------------------- - Segmentation fault while disassembling original basic blocks A bug was identified in disassembling the original parsed version of a basic block after the basic block's or its parent function's current memory image was disassembled. Due to a coding error, the original functions instructions were accidentally deleted after the current memory disassembly was performed, so a subsequent attempt to view the original disassembly for a basic block tried to access freed memory. - Warnings from tableVisi and barChart when using multiple pid predicate A bug was identified when using pid predicates containing more than one pid. In such situations, the barChart and tableVisi visualizations printed warnings of the form "could not find / in component xxxx". The warning was generated due to the use of a comma to separated pids in the focus name, since the comma is used by the visis as a special separator to parse the focus name into components. The use of a comma to separate pids has been eliminated. - Incorrect basic block exit instrumentation A bug was identified in basic block exit instrumentation where the block's startAddr was used instead of exitAddr for the instrumentation point. This bug caused problems ranging from incorrect measurements to kernel crashes when using metrics that relied on exit instrumentaion (includes all metrics that are virtualized such as timers and hardware counter metrics). - Visi not sampling metric-focuses A bug was identified where a group of metric-focuses were added to a visualization, but no numbers were being sampled due to the "Code" or "" resource being selected as well. Kperfmon now ignores foci that aren't a function or basic block. - Asserts when using Kperfmon TCL command interface Two bugs were identified in the kperfmon tcl command interface that caused asserts to be triggered when improper arguments were supplied to certain commands. Invalid arguments to these commands now properly cause error messages to be displayed to the user. IA-32/Linux Specific Fixes -------------------------- - 32-bit code generation A bug was identified in the kerninstAPI code generation for 32-bit code on IA-32/Linux. For certain arithmetic and logical operators with two source operands, it was possible that the second source operand was stored in the same pseudoregister as was allocated for holding the result (the destination). Due to a logic error, the second source operand was always being overwritten before the operator was applied, leading to inaccurate behavior. - Kernel crash when relocating short pc-relative jumps A bug was identified where short pc-relative jumps were not being relocated properly, causing jumps into random areas of kernel memory and leading to kernel crashes. - Segmentation fault when doing basic block exit instrumentation A bug was identified in x86_basicblock::getExitPoint() that caused a lookup for an instruction at address zero, leading to a segfault. - Assert when absolute jump to non-kernel segment found Previously, all functions containing jumps to non-kernel segments were required to be listed in the "skips.txt" file read by kerninstd. If a function contained such a jump and was not listed, an assert triggered while parsing the function. This requirement has been removed. - Warning when initializing an x86_insnVec from raw bytes A bug was identified in the initialization of an x86_insnVec object from a buffer of raw instruction bytes. A warning was printed every time the parsing of the raw bytes resulted in a total number of bytes that differed from the size of the buffer. However, this behavior is expected when the buffer was generated from a call to peek_kernel_contig(), which always returns an integral number of 4-byte words. The warning has been suppressed when the expected number of bytes % 4 == 0. - Virtualized metric cleanup Several bugs were identified in the handling of virtualized metrics that caused problems ranging from incorrect measurements to kernel crashes. When a client of Kerninstd disconnected, some of the client state kept in the kerninst driver was not being cleaned up, causing problems when another client started interacting with Kerninstd. Also, some virtualized timer state was not being removed from the driver when the corresponding metric-focus was disabled/removed by a client, causing subsequent metric-focuses that used a virtualized timer to produce incorrect measurements. - Incorrect measurements for functions using kernel provided synchronization mechanisms (e.g., spinlocks, semaphores) A bug was identified where conditional branches to synchronization code specific to one function but outside the reported bounds of the function's code were incorrectly being identified as interprocedural exits to the function. This caused exit instrumentation to be improperly placed at these points, and led to incorrect measurements for virtualized metrics, which rely on accurate identification of function entry and exit points.