Skip to content

Add additional sim flow debug logs#98

Open
AlexJones0 wants to merge 1 commit intolowRISC:masterfrom
AlexJones0:sim_logging
Open

Add additional sim flow debug logs#98
AlexJones0 wants to merge 1 commit intolowRISC:masterfrom
AlexJones0:sim_logging

Conversation

@AlexJones0
Copy link
Contributor

If I run a large amount of sim jobs (e.g. OpenTitan Earlgrey nightly regression), then even with verbose logs it spends a few minutes with no output on my machine. This PR adds some more debug logs so that we know what DVSim is doing during this time. I am note sure if DEBUG is appropriate or if VERBOSE is more appropriate here - it is not clear where the line should lie, so please do give any opinions.

Aside: it turns out the large runtime is because DVSim generates a new deploy object for each seed and individually runs wildcard processing for each seed, which was giving me ~15 million wildcard expansions for the nightly! I am not sure if this is a required feature because we need seeds to be usable in the wildcards, but even if so, it could be much more efficient to do all non-seed expansion first and then share the result for each seed/deploy. But this probably requires a larger refactor of how DVSim handles cfgs in general...

Add logs for initializing a RunTest object (which leads to wildcard
expansion) and for creating a build mode object.

For large regression runs, this tells us what DVSim is doing with debug
logs when it is spending a long time creating these objects (due to many
duplicate seeds).

Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
@machshev
Copy link
Collaborator

Yes the wildcard evaluation is not very efficient at all: #35
This draft PR that can’t be merged (and would need significant rebasing) was my attempt to improve the wildcard evaluation so it's more eager. The problem was it resolved wildcards too early, taking fallback values as the final value.

I think it would be useful to update the HJSON schema so it's clearer which attributes are "variables" to be used in substitutions and which are attributes required by DVSim. While doing that resolve the name clashes so that default values can be evaluated later.

Copy link
Collaborator

@machshev machshev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! debug is probably the right level... in Rust I'd probably suggest trace for this. But we don't have that in our logger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants