Browse Prior Art Database

Verification method for hardware based profiling

IP.com Disclosure Number: IPCOM000235487D
Publication Date: 2014-Mar-04
Document File: 4 page(s) / 149K

Publishing Venue

The IP.com Prior Art Database

Abstract

To verify the correctness and effectiveness of dynamic hardware profiling, a two pass verification method is used. In the first pass a "perfect" table of the code to be profiled. The "perfect: table is used in the second pass to verify results from the dynamic hardware profiler follow expected distributions with low overhead.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 48% of the total text.

Page 01 of 4

Verification method for hardware based profiling

Disclosed is a technique to verify correctness and measure effectiveness of dynamic hardware based profiling.

Verifying hardware meant to dynamically profile code, specifically a hotness table in a Performance Monitoring Unit (PMU) involves verifying the correctness of operation and the usability of the data it provides. With dynamic environments and/or random code, event distributions are not always known before hand, which makes normal unit verification tests inadequate in

proving correctness of hardware. Similarly, as processors move towards these dynamic environments and hardware is developed to dynamically profile code, proving the results are useable and providing benefit to the hardware/software using them is important.

Disclosed is a technique to prove the distributions derived from the hardware profiler are consistent with the distribution derived in the first pass. That is, the information is useable for yielding useful results. Since one goal of using hardware to dynamically profile code includes reducing overhead that regular software profiling requires, the disclosed method can be used to ensure hardware is only being used when benefits would be provided. A two pass, adaptive, perfect model verification method is utilized. The first pass creates a "perfect" table of the code to be profiled. After the first pass, the perfect table is analyzed to determine threshold entries of which instructions are statistically probable to be highlighted by hardware in the second pass. The second pass runs with code profiling, a hotness table on and uses data from the first pass to verify correctness and effectiveness of hardware. Decisions regarding correctness are made over multiple interrupts to prevent outliers from causing false fails. Optimization can done between passes. Figure 1 depicts an example distribution.

Figure 1

The second pass verification may be implemented in assembler code to be reusable in lab setting and run on accelerators. Filters and thresholds are set.

Figure 2 depicts example distribution of interrupts.

1


Page 02 of 4

Figure 2

Figure 3 Pass 1 depicts a flow. Trace interrupts are used to create a perfect table of code that is to be profiled.

Instructions that pass desired filters (ones that will be turned on during hardware profiling) are placed in an array. Perfect table is searched, new entries have their address, instruction, and counts stored. Instructions already in the table have counts incremented. Array size adapts based on unique entries to better adapt to different code lengths without wasting cycles or

missing information. System call counts used to keep track of run time for pass 1 to be used to ensure equal sample time in pass 2 and to determine threshold values for perfect table and hotness table. Total instructions counted are kept track, when table is "full" or perfect table threshold met pass 1 ends.

Figure 4 depicts a flow for Threshold/Sorti...