Description
The host passes information to the runtime via a string to string mapping of properties. Adding a property represents a non-trivial cost, but is currently the only way we have to pass more information from the host to the runtime.
We should add a different mechanism for this. We can pass over a callback (similar to what we currently do BUNDLE_PROBE
and PINVOKE_OVERRIDE
) for getting properties. Something like:
size_t STDMETHODCALLTYPE get_runtime_property(
const char* key,
void* value_buffer,
size_t value_buffer_size)
The value_buffer
actual type would depend on the key
, such that we could have structured information.
This would enable us to provide the information necessary to support:
- Log details of app being launched by dotnet(.exe) to ETW/LTTng #3156
- Getting command line via diagnostic pipe GetProcessInfo command during suspension only reports process name #59439
- Getting managed assembly entrypoint on diagnostic pipe GetProcessInfo2 command during suspension #56808
Runtimes need to continue to respect the existing properties, but once the callback exists, it could also be used for existing properties as appropriate. This would be a step towards: