-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
EventPipe support for ProcessInfo #87562
Conversation
Tagging subscribers to this area: @tommcdon Issue DetailsMissing process information - work by @elinor-fung to support
|
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsMissing process information - work by @elinor-fung to support
|
if (PalInterlockedCompareExchangePointer((void**)(&entrypoint_assembly_name), (void*)(entrypoint_assembly_name_local), nullptr) != nullptr) | ||
delete[] entrypoint_assembly_name_local; | ||
} | ||
return reinterpret_cast<const char*>(entrypoint_assembly_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.
Is always returning the process name (minus extension) what we want? So if someone renames the executable or if someone uses a nativeaot library, they would get the name of the process which would not match the assembly.
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.
I think for the first iteration, using the process name without extension is fine. We can enhance if user feedback requests this.
const wchar_t* process_name_const = wcsrchr(wszModuleFileName, DIRECTORY_SEPARATOR_CHAR); | ||
if (process_name_const != NULL) { | ||
process_name_const++; | ||
} | ||
size_t len = -1; | ||
const wchar_t* extension = wcsrchr(process_name_const, '.'); | ||
if (extension != NULL) { | ||
len = extension - process_name_const; | ||
} |
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.
You could define something like _tcslen
/ _tcsrchr
based on the platform and then share this logic for finding the start of the name and its length.
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.
Added this to the tracking issue, #87069
Missing process information - work by @elinor-fung to support
commandLine
and addedmanagedEntrypointAssemblyName
. Enabled the existing diagnostic tests related to this.