Skip to content

Commit

Permalink
Merge pull request #10 from dr-sc/remove_retire_spec_groups
Browse files Browse the repository at this point in the history
Remove RETIRED and SPEC groups and move events from them to GENERAL
  • Loading branch information
bcstrongx authored Oct 25, 2024
2 parents 83c7d1b + ba5d82d commit ca08212
Show file tree
Hide file tree
Showing 10 changed files with 110 additions and 155 deletions.
17 changes: 16 additions & 1 deletion adoc_event_tables/general.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
.GEN group events
.GENERAL group events
[width="100%",cols="30%,70%",options="header",]
|===
|Name |Description
|CYCLES.HART |Cycles when the hart is not in halt state. The cycles are counted with real (potentially variable) frequency the hart is working at
|INST.RET |Number of instructions retired
|INST.SPEC |Number of instructions issued
|INST.LOAD.RET |Number of memory load instructions retired
|INST.LOAD.SPEC |Number of memory load instructions issued
|INST.LOAD.UC.RET |Number of memory load instructions retired which accessed uncacheble memory
|INST.STORE.RET |Number of memory store instructions retired
|INST.STORE.SPEC |Number of memory store instructions issued
|INST.INT.RET |Number of integer instructions retired
|INST.INT.SPEC |Number of integer instructions issued
|INST.FPU.RET |Number of FPU instructions retired
|INST.FPU.SPEC |Number of FPU instructions issued
|UOP.RET |Number of micro-operations retired
|UOP.SPEC |Number of micro-operations issued
|FLUSH.SPEC |Counts pipeline flushes due to all reasons - such as branch misprediction, memory disambiguation, serializing instructions
|FLUSH.CYCLES |Cycles to recover from pipeline flushes due to any reason. Examples: branch misprediction, memory disambiguation, serializing instruction
|===

8 changes: 0 additions & 8 deletions adoc_event_tables/prediction_spec.adoc

This file was deleted.

13 changes: 0 additions & 13 deletions adoc_event_tables/retired.adoc

This file was deleted.

12 changes: 0 additions & 12 deletions adoc_event_tables/spec.adoc

This file was deleted.

20 changes: 1 addition & 19 deletions body.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,12 @@ In addition most of the groups are further split into 2 variants:

NOTE: _In general, RET events are more useful for performance analysis, since they are consistent with software's view of the instruction flow. But they can be significantly more expensive to implement, as they require event data to be staged along with the associated instruction to retirement. It is up to implementations to decide whether to support the RET, SPEC, or both variants of an event._

=== GEN
=== GENERAL

This group contains general events not specific to a particular part of CPU pipeline.

include::adoc_event_tables/general.adoc[]

=== RETIRED

This group contains events measured at retirement which didn't fall into any specific group below.

include::adoc_event_tables/retired.adoc[]

=== SPEC

This group contains speculative events which didn't fall into any specific group below.

include::adoc_event_tables/spec.adoc[]

=== CTRL_FLOW (retirement)

Retirement control flow group which contains events and metrics for counting all control transfer instructions, or just those that were mispredicted, including breakdowns by transfer type.
Expand All @@ -35,12 +23,6 @@ include::adoc_event_tables/prediction_retired.adoc[]

include::adoc_event_tables/prediction_metrics.adoc[]

=== CTRL_FLOW (speculative)

Speculation prediction group. Unlike most of the groups below prediction events mostly naturally counted only at retirement time. So this group contains only a few events which make sense to count speculatively.

include::adoc_event_tables/prediction_spec.adoc[]

=== CACHE (retirement)

This group contains events and metrics for data and instruction caches (all levels) counted at retirement.
Expand Down
90 changes: 90 additions & 0 deletions event_files/general.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,95 @@
"EventCode": "0x0",
"BriefDescription": "Cycles when the hart is not in halt state",
"PublicDescription": "Cycles when the hart is not in halt state. The cycles are counted with real (potentially variable) frequency the hart is working at"
},
{
"EventName": "INST.RET",
"EventCode": "0x0",
"BriefDescription": "Number of instructions retired",
"PublicDescription": "Number of instructions retired"
},
{
"EventName": "INST.SPEC",
"EventCode": "0x0",
"BriefDescription": "Number of instructions issued",
"PublicDescription": "Number of instructions issued"
},
{
"EventName": "INST.LOAD.RET",
"EventCode": "0x0",
"BriefDescription": "Number of memory load instructions retired",
"PublicDescription": "Number of memory load instructions retired"
},
{
"EventName": "INST.LOAD.SPEC",
"EventCode": "0x0",
"BriefDescription": "Number of memory load instructions issued",
"PublicDescription": "Number of memory load instructions issued"
},
{
"EventName": "INST.LOAD.UC.RET",
"EventCode": "0x0",
"BriefDescription": "Number of memory load instructions retired which accessed uncacheble memory",
"PublicDescription": "Number of memory load instructions retired which accessed uncacheble memory"
},
{
"EventName": "INST.STORE.RET",
"EventCode": "0x0",
"BriefDescription": "Number of memory store instructions retired",
"PublicDescription": "Number of memory store instructions retired"
},
{
"EventName": "INST.STORE.SPEC",
"EventCode": "0x0",
"BriefDescription": "Number of memory store instructions issued",
"PublicDescription": "Number of memory store instructions issued"
},
{
"EventName": "INST.INT.RET",
"EventCode": "0x0",
"BriefDescription": "Number of integer instructions retired",
"PublicDescription": "Number of integer instructions retired"
},
{
"EventName": "INST.INT.SPEC",
"EventCode": "0x0",
"BriefDescription": "Number of integer instructions issued",
"PublicDescription": "Number of integer instructions issued"
},
{
"EventName": "INST.FPU.RET",
"EventCode": "0x0",
"BriefDescription": "Number of FPU instructions retired",
"PublicDescription": "Number of FPU instructions retired"
},
{
"EventName": "INST.FPU.SPEC",
"EventCode": "0x0",
"BriefDescription": "Number of FPU instructions issued",
"PublicDescription": "Number of FPU instructions issued"
},
{
"EventName": "UOP.RET",
"EventCode": "0x0",
"BriefDescription": "Number of micro-operations retired",
"PublicDescription": "Number of micro-operations retired"
},
{
"EventName": "UOP.SPEC",
"EventCode": "0x0",
"BriefDescription": "Number of micro-operations issued",
"PublicDescription": "Number of micro-operations issued"
},
{
"EventName": "FLUSH.SPEC",
"EventCode": "0x0",
"BriefDescription": "Counts pipeline flushes due to all reasons",
"PublicDescription": "Counts pipeline flushes due to all reasons - such as branch misprediction, memory disambiguation, serializing instructions"
},
{
"EventName": "FLUSH.CYCLES",
"EventCode": "0x0",
"BriefDescription": "Cycles to recover from pipeline flushes",
"PublicDescription": "Cycles to recover from pipeline flushes due to any reason. Examples: branch misprediction, memory disambiguation, serializing instruction"
}
]
14 changes: 0 additions & 14 deletions event_files/prediction_spec.json

This file was deleted.

44 changes: 0 additions & 44 deletions event_files/retired.json

This file was deleted.

38 changes: 0 additions & 38 deletions event_files/spec.json

This file was deleted.

9 changes: 3 additions & 6 deletions gen_event_tables_adocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
import json

event_files = ['cache_retired.json', 'cache_spec.json', 'prediction_retired.json',
'prediction_spec.json', 'rvv_retired.json', 'rvv_spec.json',
'tlb_retired.json', 'tlb_spec.json', 'topdown.json',
'general.json', 'retired.json', 'spec.json']
'rvv_retired.json', 'rvv_spec.json', 'tlb_retired.json', 'tlb_spec.json',
'topdown.json', 'general.json']

metric_files = ['cache_retired_metrics.json', 'cache_spec_metrics.json',
'prediction_metrics.json', 'rvv_retired_metrics.json', 'rvv_spec_metrics.json',
Expand All @@ -19,9 +18,7 @@
'tlb_retired.json': 'TLB',
'tlb_spec.json': 'TLB',
'topdown.json': 'TOPDOWN',
'general.json': 'GEN',
'retired.json': 'RETIRED',
'spec.json': 'SPEC',
'general.json': 'GENERAL',
'cache_retired_metrics.json': 'CACHE',
'cache_spec_metrics.json': 'CACHE',
'prediction_metrics.json': 'CTRL_FLOW',
Expand Down

0 comments on commit ca08212

Please sign in to comment.