Skip to content

Initial work to enable EventPipe in Linux#86226

Merged
LakshanF merged 10 commits into
dotnet:mainfrom
LakshanF:eventpipe_linux2
May 25, 2023
Merged

Initial work to enable EventPipe in Linux#86226
LakshanF merged 10 commits into
dotnet:mainfrom
LakshanF:eventpipe_linux2

Conversation

@LakshanF
Copy link
Copy Markdown
Contributor

@LakshanF LakshanF commented May 14, 2023

Support to enable EventPipe in Unix. The new additions include:

  • Including socket support in the build for Unix
  • pthread for thread local storage
  • PalGetCurrentThreadIdForLogging to get the thread id
  • gmtime and gettimeofday (for milliseconds) to get system time
  • utf16 length and conversions between utf16 to utf8
  • default transport name consisting of a combination of temp path, process id and a disambiguation_key

@LakshanF LakshanF added this to the 8.0.0 milestone May 14, 2023
@LakshanF LakshanF self-assigned this May 14, 2023
@ghost
Copy link
Copy Markdown

ghost commented May 14, 2023

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Issue Details

CI check

Author: LakshanF
Assignees: LakshanF
Labels:

area-NativeAOT-coreclr

Milestone: 8.0.0

@LakshanF LakshanF marked this pull request as draft May 14, 2023 20:55
Comment thread src/coreclr/nativeaot/Runtime/startup.cpp Outdated
Comment thread src/coreclr/nativeaot/Directory.Build.props Outdated
@LakshanF LakshanF marked this pull request as ready for review May 18, 2023 11:01
@LakshanF LakshanF requested a review from davidwrighton May 18, 2023 16:48
Copy link
Copy Markdown
Member

@davidwrighton davidwrighton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've not reviewed the build system changes, as I'm not familiar with the details of how the nativeaot build system works.

Comment thread src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-aot.h
Comment thread src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-aot.h Outdated
Comment thread src/coreclr/nativeaot/Runtime/eventpipe/ds-rt-aot.h Outdated
Comment thread src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-aot.h Outdated
Comment thread src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-aot.h Outdated
Comment thread src/coreclr/nativeaot/Runtime/startup.cpp
Comment thread src/coreclr/nativeaot/Directory.Build.props Outdated
LakshanF and others added 2 commits May 22, 2023 14:04
Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
Comment thread src/coreclr/nativeaot/Runtime/eventpipe/ds-rt-aot.cpp
Comment thread src/coreclr/nativeaot/Runtime/eventpipe/ds-rt-aot.h Outdated
Comment thread src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-aot.h Outdated
EventPipeThreadHolder *thread_holder = pthread_getThreadHolder ();
#else
EventPipeThreadHolder *thread_holder = EventPipeAotThreadHolderTLS::getThreadHolder ();
#endif
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the platform difference something that could be encapsulated in EventPipeAotThreadHolderTLS? The name of that class makes me think it is intended to hide away implementation like that, so it seems odd to me that the caller has to do the split.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EventPipeAotThreadHolderTLS class seems windows specific with ability to use of thread_local and the class destructor doing the cleanup.

Comment thread src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-aot.h Outdated
Comment thread src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-aot.h
Comment thread src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-aot.cpp Outdated
Comment thread src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-aot.h
Comment thread src/coreclr/nativeaot/Runtime/eventpipe/ds-rt-aot.cpp
LakshanF and others added 2 commits May 24, 2023 04:56
Co-authored-by: Elinor Fung <elfung@microsoft.com>
@LakshanF LakshanF merged commit ceb52b3 into dotnet:main May 25, 2023
@LakshanF LakshanF deleted the eventpipe_linux2 branch May 25, 2023 11:57
@ghost ghost locked as resolved and limited conversation to collaborators Jun 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants