Method and apparatus for correlating profile data
First Claim
1. An apparatus providing a software tool encoded in at least one non-transitory machine-readable storage medium, comprising:
- a first set of instructions, stored in at least one machine-readable storage medium and executable by at least one processing unit, that collects profile data during execution of code by;
incrementing a hardware counter when at least one runtime event associated with the hardware counter is detected during the execution of the code;
sampling the at least one runtime event when the hardware counter exceeds a threshold during the execution of the code;
determining an instruction instance that corresponds to the at least one runtime event by backtracking from a first point in the code that coincides with the detection of the at least one runtime event that caused the hardware counter to exceed the threshold to a second point in the code that is associated with the at least one runtime event;
decoding the corresponding instruction instance to determine a data address indicated by the corresponding instruction instance;
validating the data address; and
in response to validating the data address, recording the at least one runtime event, the associated instruction instance data address, and a plurality of code behavior attributes associated with the data address based on an inline annotation of the instruction instance comprising a context index of a construct table to identify a source-level language construct that represents a source-level data object associated with the at least one run-time event, the source level-language construct being one of the plurality of code behavior attributes;
a second set of instructions, stored in the at least one machine-readable storage medium and executable by the at least one processing unit, that aggregates code execution hindrances from the profile data collected during the execution of the code based, at least in part, on a first code behavior attribute of the plurality of code behavior attributes;
a third set of instructions, stored in the at least one machine-readable storage medium and executable by the at least one processing unit, that filters the aggregated code execution hindrances based on one or more instances of the first code behavior attribute; and
a fourth set of instructions, stored in the at least one machine-readable storage medium and executable by the at least one processing unit, that aggregates the filtered code execution hindrances based, at least in part, on a second code behavior attribute of the plurality of code behavior attributes to correlate code execution hindrances with the first code behavior attribute and the second code behavior attribute.
2 Assignments
0 Petitions
Accused Products
Abstract
Correlating profile data facilitates sophisticated code optimization. Going beyond one to one relationships between code execution hindrances and single code behavior attributes provides insight into code behavior at a finer level of granularity. The capability to aggregate profile data based on multiple code behavior attributes and filter based on instances thereof, allows code optimization decisions to be made based on presentation of profile data from various perspectives. Profile data, which includes code behavior attributes correlated with code execution hindrances, is aggregated based at least in part on a first code behavior attribute. Code behavior attributes include one or more of memory references, memory reference objects, functions, time ranges, processors, processes, threads, and source-level data objects. The aggregated profile data is filtered based on an instance of the first code behavior attribute. The filtered profile data is then aggregated based on one or more additional code behavior attributes.
76 Citations
26 Claims
-
1. An apparatus providing a software tool encoded in at least one non-transitory machine-readable storage medium, comprising:
-
a first set of instructions, stored in at least one machine-readable storage medium and executable by at least one processing unit, that collects profile data during execution of code by; incrementing a hardware counter when at least one runtime event associated with the hardware counter is detected during the execution of the code; sampling the at least one runtime event when the hardware counter exceeds a threshold during the execution of the code; determining an instruction instance that corresponds to the at least one runtime event by backtracking from a first point in the code that coincides with the detection of the at least one runtime event that caused the hardware counter to exceed the threshold to a second point in the code that is associated with the at least one runtime event; decoding the corresponding instruction instance to determine a data address indicated by the corresponding instruction instance; validating the data address; and in response to validating the data address, recording the at least one runtime event, the associated instruction instance data address, and a plurality of code behavior attributes associated with the data address based on an inline annotation of the instruction instance comprising a context index of a construct table to identify a source-level language construct that represents a source-level data object associated with the at least one run-time event, the source level-language construct being one of the plurality of code behavior attributes; a second set of instructions, stored in the at least one machine-readable storage medium and executable by the at least one processing unit, that aggregates code execution hindrances from the profile data collected during the execution of the code based, at least in part, on a first code behavior attribute of the plurality of code behavior attributes; a third set of instructions, stored in the at least one machine-readable storage medium and executable by the at least one processing unit, that filters the aggregated code execution hindrances based on one or more instances of the first code behavior attribute; and a fourth set of instructions, stored in the at least one machine-readable storage medium and executable by the at least one processing unit, that aggregates the filtered code execution hindrances based, at least in part, on a second code behavior attribute of the plurality of code behavior attributes to correlate code execution hindrances with the first code behavior attribute and the second code behavior attribute. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A method of providing profile data, the method comprising:
-
collecting profile data during executing of code, utilizing at least one processing unit, by; incrementing a hardware counter when at least one runtime event associated with the hardware counter is detected during the execution of the code; sampling the at least one runtime event during the execution of the code utilizing the at least one processing unit when the hardware counter exceeds a threshold;
determining an instruction instance that corresponds to the at least one runtime event utilizing the at least one processing unit by backtracking from a first point in the code that coincides with the detection of the at least one runtime event that that caused the hardware counter to exceed the threshold to a second point in the code that is associated with the at least one runtime event;decoding the corresponding instruction instance utilizing the at least one processing unit to determine a data address indicated by the corresponding instruction instance; validating the data address; and in response to validating the data address, recording the at least one runtime event, the associated instruction instance data address, and a plurality of code behavior attributes associated with the data address based on an inline annotation of the instruction instance comprising a context index for of a construct table to identify a source-level language construct that represents a source-level data object associated with the at least one run-time event, the source level-language construct being one of the plurality of code behavior attributes; aggregating the profile data collected during the execution of the code, utilizing the at least one processing unit, the profile data including the code behavior attributes correlated with execution hindrances of the code, based at least in part on a first code behavior attribute of the plurality of code behavior attributes; filtering the aggregated profile data, utilizing the at least one processing unit, based, at least in part, on a first instance of the first code behavior attribute; and aggregating the filtered profile data, utilizing the at least one processing unit, based at least in part on a second code behavior attribute of the plurality of code behavior attributes to correlate code execution hindrances with the first code behavior attribute and the second code behavior attribute. - View Dependent Claims (11, 12, 13, 14, 15, 16)
-
-
17. A computer program product for providing profile data, encoded in one or more non-transitory machine-readable storage medium, the computer program product comprising:
-
a first sequence of instructions, stored in at least one machine-readable storage medium and executable by at least one processing unit, for collecting profile data during execution of code by; incrementing a hardware counter when at least one runtime event associated with the hardware counter is detected during the execution of the code; sampling the at least one runtime event when the hardware counter exceeds a threshold during the execution of the code; determining an instruction instance that corresponds to the at least one runtime event by backtracking from a first point in the code that coincides with the detection of the at least one runtime event that caused the hardware counter to exceed the threshold to a second point in the code that is associated with the at least one runtime event; decoding the corresponding instruction instance to determine a data address indicated by the corresponding instruction instance; validating the data address; and associating the at least one runtime event with an instruction instance and a plurality of code behavior attributes that correspond to the at least one runtime event, and in response to validating the data address, recording the at least one runtime event, the associated instruction instance data address, and a plurality of code behavior attributes associated with the data address based on an inline annotation of the instruction instance in the code comprising a context index of a construct table to identify a source-level language construct that represents a source-level data object associated with the at least one run-time event, the source level-language construct being one of the plurality of code behavior attributes; a second sequence of instructions, stored in the at least one machine-readable storage medium and executable by the at least one processing unit, for aggregating the profile data collected during the execution of the code, the profile data including code execution hindrances, by a first code behavior attribute of the plurality of code behavior attributes, wherein the code execution hindrances are correlated with instances of the first code behavior attribute; a third sequence of instructions, stored in the at least one machine-readable storage medium and executable by the at least one processing unit, for filtering the aggregated profile data by a first of the first code behavior attribute instances; and a fourth sequence of instructions, stored in the at least one machine-readable storage medium and executable by the at least one processing unit, for aggregating the filtered profile data by a second code behavior attribute of the plurality of code behavior attributes, wherein instances of the second code behavior attribute are correlated with the code execution hindrances to correlate code execution hindrances with the first code behavior attribute and the second code behavior attribute. - View Dependent Claims (18, 19, 20, 21, 22, 23, 24, 25, 26)
-
Specification