EP0919918A2

Apparatus for randomly sampling instructions in a processor pipeline

Abstract

An apparatus is provided for sampling instructions in a processor pipeline of a system. The pipeline has a plurality of processing stages. The apparatus includes a fetch unit for fetching instructions into a first stage of the pipeline. Certain randomly selected instructions are identified, and state information of the system is sampled while a particular selected instruction is in any stage of the pipeline. Software is informed when the particular selected instruction leaves the pipeline so that the software can read any of the sampled state information.

EP0919918A2, drawing sheet 1
Sheet 1 of 22

Term

Term ended

Projected expiry passed 25 November 2018, 7.8 years ago.

  1. Priority
  2. Filed
  3. Published
  4. Projected expiry
  5. Today

29 claims: 14 independent, 15 dependent

  1. 1
    An apparatus for sampling instructions in a processor pipeline of a system, the pipeline having a plurality of processing stages, comprising:means for fetching instructions into a first stage of the pipeline;means for identifying any one of the fetched instructions as a selected instruction;means for sampling state information of the system while a particular selected instruction is in any stage of the pipeline;and means for informing software when the particular selected instruction leaves the pipeline so that the software can read any of the state information.
  2. 5
    The apparatus of any of claims 1 to 4, wherein the plurality of stages include fetch, map, issue, execution, and retire stages.
  3. 6
    The apparatus of any of claims 1 to 5, wherein instructions are identified by additional fields indicating that they have been selected for sampling.
  4. 9
    The apparatus of any of claims 1 to 8, further including a sampling counter;means for initializing the sampling counter to a specified value;means for activating the means for selecting when the sample counter overflows in response to specified events.
  5. 17
    The apparatus of any of claims 1 to 16, wherein the state information includes information identifying the selected instruction.
  6. 20
    The apparatus of any of claims 1 to 16, wherein the identifying information includes address space numbers.
  7. 21
    The apparatus of any of claims 1 to 16, wherein the identifying information includes a hardware context identifier.
  8. 22
    The apparatus of any of claims 1 to 21, wherein the means for informing software generates an interrupt when the particular selected instruction leaves the pipeline.
  9. 23
    The apparatus of any of claims 1 to 21, wherein the means for informing software sets a flag that can be polled by the software to determine that the particular selected instruction has left the pipeline.
  10. 24
    The apparatus of any of claims 1 to 23, wherein a subset of the selected instructions are sampled.
  11. 25
    The apparatus of any of claims 1 to 24, wherein the state information includes a thread identifier.
  12. 26
    The apparatus of any of claims 1 to 23, wherein the state information includes a retired/abort status of the selected instructions.
  13. 27
    The apparatus of any of claims 1 to 23, wherein the state information includes a events detected while processing the selected instructions.
  14. 28
    The apparatus of any of claims 1 to 23, wherein the state information includes latencies experienced by the selected instructions.