Added racing DMA LZ4 & LZ4T implementations#824
Added racing DMA LZ4 & LZ4T implementations#824aglab2 merged 8 commits intoHackerN64:develop/2.4.0from
Conversation
src/engine/level_script.c
Outdated
|
|
||
| #ifdef PUPPYPRINT_DEBUG | ||
| if (gLoadLevel && gLoadLevelAreaTime) { | ||
| u32 totalTime = gLoadLevelAreaTime + (osGetCount() - first); |
There was a problem hiding this comment.
Isn't gLoadLevelAreaTime unnecessary? I feel like it's getting counted more than once.
There was a problem hiding this comment.
I did not write this code, @FazanaJ needs to elaborate. From what I see it is needed though.
There was a problem hiding this comment.
No, looking back at it this is definitely wrong. gLoadLevelAreaTime can be used as a factor to the if statement I guess, but just the osGetCount() - first is all that's needed here. init_level is getting invoked after first has already been set.
There was a problem hiding this comment.
Ultimately this was the product of a 5 minute, if that, attempt to get a better readout. I never checked that it was accurate, just representative. Ideally something better would be done to give an accurate readout but that was effort I wasn't gonna do at the time
There was a problem hiding this comment.
Actually on second glance, this is still extremely inaccurate because it also throws an entire update_level call into the reading.
There was a problem hiding this comment.
Either the profiling on this should be relatively accurate or this needs to be purged from the repo entirely, since we're better off with no profiling than bad profiling.
There was a problem hiding this comment.
I have addressed this issue. I am measuring time between level_cmd_init_level (called right before loading banks) and init_level (called after all area loads commands).
src/game/level_update.c
Outdated
| gLoadLevelAreaTime = osGetCount() - first; | ||
| if (gInitLevelTime) { | ||
| u32 totalTime = osGetCount() - gInitLevelTime; | ||
| append_puppyprint_log("Level loaded in %2.3fs.", (f64) (f32)((totalTime) / 46875000.0f)); |
There was a problem hiding this comment.
Please use something like OS_CYCLES_TO_USEC rather than this magic constant.
There was a problem hiding this comment.
Constant was removed and replaced with OS_CYCLES_TO_USEC
No description provided.