Sampling mechanism including instruction filtering
AssigneeSun Microsystems, Inc.
InventorsAdam Talcott, Mario Wolczko
Life of this patent
Estimating the term…
Abstract
A sampling mechanism is disclosed in which software can specify a property or properties which characterize samples of interest. For example, if the software is interested in cache behavior, the software can specify that information for memory operations, or only information for memory instructions which miss in one or more caches, be reported. The sampling mechanism may specify many such properties and events (properties and events may vary from processor to processor, and may also depend on which properties or events are considered useful for performance analysis).
Claims5
A method of sampling instructions executing in a processor comprising:
- setting a candidate counter to a number
- selecting an instruction for sampling;
- storing information relating to the instruction after the instruction is selected for sampling, the information relating to the instruction including information relating to execution of the instruction;
- determining whether all events for the instruction have occurred;
- determining whether the instruction includes events of interest, the events of interest being based upon the information relating to execution of the instruction;
- decrementing the candidate counter when all events for the instruction have occurred and
- when the instruction includes events of interest;
- determining whether the candidate counter equals zero;
- reporting the instruction when the candidate counter equals zero;
- and,
- repeating the setting, selecting, storing, determining whether all events for the instruction have occurred, determining whether the instruction includes events of interest, decrementing and reporting, such that while information is stored relating to a plurality of instructions, then information relating to an instruction is only reported for instructions containing events of interest.
Dependencies are inferred from the claim text.