Skip to content
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

IsEventSourceLoggingEnabled Missing on Linux ARM #5422

Closed
manu-st opened this issue Mar 22, 2016 · 8 comments
Closed

IsEventSourceLoggingEnabled Missing on Linux ARM #5422

manu-st opened this issue Mar 22, 2016 · 8 comments
Milestone

Comments

@manu-st
Copy link

manu-st commented Mar 22, 2016

I'm having an issue on Linux Arm where it cannot find an ID for method IsEventSourceLoggingEnabled at line 542 of ecall.cpp (https://github.com/dotnet/coreclr/blob/master/src/vm/ecall.cpp#L542)

Turns out that FEATURE_EVENT_TRACE is disabled for Linux ARM by this PR dotnet/coreclr#2935. Should this be reverted back to allow FEATURE_EVENT_TRACE for all platforms? Or should we change mscorlib to not call it when it is not defined?

@manu-st
Copy link
Author

manu-st commented Mar 22, 2016

For the time being, I've enabled FEATURE_EVENT_TRACE without visible ill effect.

@manu-st
Copy link
Author

manu-st commented Mar 23, 2016

@jkotas Any idea about this one?

@jkotas
Copy link
Member

jkotas commented Mar 23, 2016

There is a mismatch when the FEATURE_EVENTSOURCE_XPLAT is defined on managed vs. managed sides.

I think it may be best to:

  • Enable XplatEventLogger on managed side for all non-Windows platforms (ie change the ifdef around it to FEATURE_PAL). XplatEventLogger is very small, and so it is not a problem to have compiled in even when it is not strictly necessary.
  • Add dummy unmanaged implementation of the two internal calls needed by XplatEventLogger (XplatEventSourceLogger::IsEventSourceLoggingEnabled and XplatEventSourceLogger::LogEventSource) for !FEATURE_EVENTSOURCE_XPLAT.

@jkotas
Copy link
Member

jkotas commented Mar 23, 2016

This should make it easy to control whether the x-plat event tracing is enabled through the one central place in top-level CMakeLists.txt.

@manu-st
Copy link
Author

manu-st commented Mar 23, 2016

@jkotas Will do that. Any special place to add the dummy unmanaged implementation?

@jkotas
Copy link
Member

jkotas commented Mar 23, 2016

We usually add those right next to the real ones. Or in this case - it may be best to just ifdef out the bodies of the real ones, like:

BOOL QCALLTYPE XplatEventSourceLogger::IsEventSourceLoggingEnabled()
{
    QCALL_CONTRACT;

    BOOL retVal = FALSE;

#if defined(FEATURE_EVENTSOURCE_XPLAT)
    BEGIN_QCALL;
    retVal = XplatEventLogger::IsEventLoggingEnabled();
    END_QCALL;
#endif

    return retVal;
}

@manu-st
Copy link
Author

manu-st commented Mar 23, 2016

Done so in PR dotnet/coreclr#3879.

@manu-st
Copy link
Author

manu-st commented Apr 20, 2016

Closed via dotnet/coreclr#3879

@manu-st manu-st closed this as completed Apr 20, 2016
@msftgits msftgits transferred this issue from dotnet/coreclr Jan 30, 2020
@msftgits msftgits added this to the Future milestone Jan 30, 2020
@dotnet dotnet locked as resolved and limited conversation to collaborators Jan 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants