shioyadan / Konata

Konata is an instruction pipeline visualizer for Onikiri2-Kanata/Gem5-O3PipeView formats. You can download the pre-built binaries from https://github.com/shioyadan/Konata/releases
BSD 3-Clause "New" or "Revised" License
390 stars 36 forks source link

gem5 retire and store completion stages #13

Open mshiryaev opened 1 year ago

mshiryaev commented 1 year ago

Hello,

Could you please clarify whether Konata supports displaying of retire and store completion stages like gem5 trace viewer?

At quick glance on Konata gem5 parser I see that the code is aware about "retire" and "mem_complete" stages . But I don't see these stages - no "mem_complete" for store operations and no "retire" for all operations (please see attached screenshot).

gem5 version is v22.1 Konata version is v0.39

Снимок

shioyadan commented 1 year ago

Hello,

Regarding "retire", I remember that I implemented it so that the entire pipeline ends there, for ease of implementation. This is because it is a bit difficult in Konata to record events (stages) where there is no command to trigger the end of the stage, such as retire ("retire" is the last command of each instruction).

"retire" exists next to the end of "complete" stages, do you think this should be shown? If there is any advantage to explicitly displaying it, I would consider modifying it.

Regarding "mem_complete", I was not aware of "--store_completions", so I don't think it is implemented. I would like to modify Konata to support this.

shioyadan commented 1 year ago

I found and remembered an implementation of "mem_complete" in the parser, but it does not support logs output by O3PipeView with "--store_completions". This part is related to a feature for parsing miscellaneous logs output by O3CPUAll and showing additional information.

mshiryaev commented 1 year ago

@shioyadan - actual execution of store operation happens after signal from "retire" stage, so "--store_completions" helps to see store latency which may be useful for example for cache write policy analysis.

In gem5 viewer "retire" stage is displayed for each instruction and store marker is additionally displayed for store instructions. I think for Konata it makes sense to use similar approach to keep stages scheme aligned with gem5 viewer.

shuheque commented 1 year ago

Agree with mshiryaev,

without processing with "retire", all the commit stage will be at least 2 cycles, and even those been flushed will have 1 cycle "commit", which is a bit confusing :)

2023-04-19_16-24

shioyadan commented 1 year ago

@mshiryaev @shuheque Thank you for your explanation. I understand that it is better to show retirement/store stages. I will modify the parser to add the feature. Please wait a while.