-
Notifications
You must be signed in to change notification settings - Fork 95
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
Log error if missing bytecode instrumentation method #1520
Log error if missing bytecode instrumentation method #1520
Conversation
…-instrumentation into log-error-if-missing-instrumentation-method
@@ -2494,14 +2494,47 @@ HRESULT CorProfiler::CallTarget_RewriterCallback(RejitHandlerModule* moduleHandl | |||
&wrapper_type_def); | |||
if (FAILED(hr) || wrapper_type_def == mdTypeDefNil) | |||
{ | |||
Logger::Warn("*** CallTarget_RewriterCallback() Failed for: ", caller->type.name, ".", caller->name, | |||
Logger::Error("*** CallTarget_RewriterCallback() Failed for: ", caller->type.name, ".", caller->name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it not be a warning? It is an oddity, but the application and instrumentation would continue to work without any bad side-effects. Should the user react when he notices such an error?
Maybe we should even "accept" such behavior so that we could use e.g. #if NETFRAMEWORK
on a whole instrumentation class? Then we could even change this level to debug.
Leaving it for a discussion + potentially separate PR.
|
||
if (!found_wrapper_method) | ||
{ | ||
Logger::Error("*** CallTarget_RewriterCallback() Failed for: ", caller->type.name, ".", caller->name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comment as above.
Why
If the bytecode instrumentation type doesn't have any of the expected instrumentation methods the bytecode instrumentation is injected during ReJIT but since there are no instrumentation methods it has no practical effect and no error/warning message is logged in any of the logs.
Fixes #1499
What
Tests
Checklist
CHANGELOG.md
is updated.- [] Documentation is updated.