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

No ETW events for function calls #3597

Closed
rbuckton opened this issue Oct 30, 2015 · 7 comments
Closed

No ETW events for function calls #3597

rbuckton opened this issue Oct 30, 2015 · 7 comments
Labels
help wanted Issues that need assistance from volunteers or PRs that need help to proceed. post-mortem Issues and PRs related to the post-mortem diagnostics of Node.js. windows Issues and PRs related to the Windows platform.

Comments

@rbuckton
Copy link

If I create a data collector on Windows for the NodeJS-ETW-provider and run my program under NodeJS, the only ETW events I see are for NODE_GC_START and NODE_GC_DONE. I was hoping to use ETW to profile my program on Windows, but it doesn't provide any information as to the functions executed, as might be the case when using dtrace.

Am I missing something, or is there something missing in NodeJS to get this to work? ETW events have been in NodeJS since 2012, so I'm not certain what could be wrong here.

@rvagg
Copy link
Member

rvagg commented Oct 30, 2015

/cc @nodejs/platform-windows

@mscdex mscdex added windows Issues and PRs related to the Windows platform. post-mortem Issues and PRs related to the post-mortem diagnostics of Node.js. labels Oct 30, 2015
@rbuckton
Copy link
Author

rbuckton commented Nov 3, 2015

I think I figured out what's wrong here. I am attempting to profile a console application running in node. When node initializes ETW, it sets up a callback to be executed via uv_async_send in a later turn. Unfortunately, node never gives that callback a chance to execute before it proceeds to loading and executing the main module, so the process exits before the callback can ever be fired.

I added a call to etw_events_change_async(NULL); immediately after the call to event_register in init_etw and saw the events I was looking for.

@Trott
Copy link
Member

Trott commented Jun 5, 2016

@rbuckton Any idea if this is still an issue on current Node.js 6.2.1? If so, any chance you might submit your fix as a patch (assuming you believe it is an appropriate solution to the problem)?

@bnoordhuis
Copy link
Member

@nodejs/platform-windows Looking at the code, I suspect this is still an issue. If I had to venture a guess, it's that init_etw() should call v8::Isolate:SetJitCodeEventHandler(v8::kJitCodeEventEnumExisting).

@Trott
Copy link
Member

Trott commented Jul 16, 2017

/ping @nodejs/platform-windows Anyone want to take this up? If not, shall we add a help wanted label?

@bnoordhuis bnoordhuis added the help wanted Issues that need assistance from volunteers or PRs that need help to proceed. label May 28, 2018
@jasnell
Copy link
Member

jasnell commented Jun 19, 2020

There's been zero activity on this in a couple years. It's not likely to see activity. Closing

@jasnell jasnell closed this as completed Jun 19, 2020
@benjamingr
Copy link
Member

@rbuckton just making it explicit that if this is something you are still interested in pursuing and is still an issue a PR is welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Issues that need assistance from volunteers or PRs that need help to proceed. post-mortem Issues and PRs related to the post-mortem diagnostics of Node.js. windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

No branches or pull requests

7 participants