Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not all Sparta histograms stats are reset after warmup #302

Open
benoy-sifive opened this issue Jan 11, 2022 · 7 comments
Open

Not all Sparta histograms stats are reset after warmup #302

benoy-sifive opened this issue Jan 11, 2022 · 7 comments
Labels
bug Something isn't working component: sparta Issue is related to sparta framework

Comments

@benoy-sifive
Copy link
Contributor

I believe there is a stat bug in Sparta for histograms. What I believe is happening is that the utilization totals are not being reset once we hit the end of the warmup window. You can see that here:

            entries_utilization_UF = 0
            entries_utilization_UF_probability = 0
            entries_utilization_OF = 0
            entries_utilization_OF_probability = 0
            entries_utilization_total = 10263 <== Should have been reset
            entries_utilization_max = 11 <== Should have been reset
            entries_utilization_weighted_avg = 0
            entries_utilization_weighted_nonzero_avg = nan
@benoy-sifive benoy-sifive added the bug Something isn't working label Jan 11, 2022
@benoy-sifive
Copy link
Contributor Author

Note:

*_total stat uses cycle counters. Are all cycle counters automatically reset at warmup? e.g. if counting then stopCounting()...startCount()
*_max stat uses COUNT_LATEST. Not sure if these need to have a special check for reseting after warmup

@ghost ghost added the component: sparta Issue is related to sparta framework label Jan 12, 2022
@ghost
Copy link

ghost commented Jan 12, 2022

Yeah, that's weird. Will take a look

@ghost
Copy link

ghost commented Jan 12, 2022

Can you tell me which resource you're using that has this histogram? Array, Buffer, Queue, CircularBuffer, etc?

@benoy-sifive
Copy link
Contributor Author

Buffer

@ghost
Copy link

ghost commented Mar 20, 2022

Well, one "mystery" somewhat solved -- entries_utilization_max is a COUNT_LATEST and it updated independent of a report. The counter is updated when the the previously recorded value is less than the new value, but the report will never know that. Not sure how to make that one work...

@ghost
Copy link

ghost commented Mar 20, 2022

Hmmm... I cannot reproduce the issue with entries_utilization_total being incorrect. I added a test to Buffer_test generating 2 reports, one without warmup and the other with warmup. The test ran for 20 cycles total.

Without warmup (report 1):

    buf_const_test_utilization_total = 20

With warmup (report 2):

    buf_const_test_utilization_total = 10

buf_const_test_utilization_max is of course still wrong...

@ghost
Copy link

ghost commented Mar 25, 2022

I can't reproduce utilization total issue, but I'll keep this open in case inspiration hits me to fix the max problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component: sparta Issue is related to sparta framework
Projects
None yet
Development

No branches or pull requests

1 participant