You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This enables debuggers to reliably decode tasks from raw memory blobs. Being able to decode raw task memory in debuggers is a prerequisite for eventually implementing logical stack traces.
I always imagined that the layout functions would compile down to a constant value after all the functions. I guess not.
I have to wonder, since the TaskLayout will never change for a given S, F and T, if it could be somehow const-evaluated at compile time and if the Header or VTable could just contain a pointer to that constant. I'm not sure if that's possible without advancing the MSRV past the previously established hard limit of 1.46, but I think it would be the best of both worlds in this case.
Yes, I theory that should be possible and pushing the data into the TaskVTable would be ideal. But as far as I can tell, const eval support is not quite there yet (not even on nightly) -- at least I couldn't get it to work. Feel free to give it a try though. I'd be very interested in how that looks :)
michaelwoerister
changed the title
Cache TaskLayout in Header for increased debuggability.
Store reference to TaskLayout in TaskVTable for increased debuggability.
Jul 7, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This enables debuggers to reliably decode tasks from raw memory blobs. Being able to decode raw task memory in debuggers is a prerequisite for eventually implementing logical stack traces.