Skip to content

No ETW events for function calls #3597

Closed

Description

@rbuckton

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.

Activity

  1. rvagg commented on Oct 30, 2015

    @rvagg
    Member

    /cc @nodejs/platform-windows

  2. added
    windowsIssues and PRs related to the Windows platform.
    post-mortemIssues and PRs related to Node.js postmortem diagnostics.
    on Oct 30, 2015
  3. rbuckton commented on Nov 3, 2015

    @rbuckton
    Author

    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.

  4. Trott commented on Jun 5, 2016

    @Trott
    Member

    @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)?

  5. bnoordhuis commented on Feb 7, 2017

    @bnoordhuis
    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).

  6. Trott commented on Jul 16, 2017

    @Trott
    Member

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

  7. added
    help wantedIssues that need assistance from volunteers or PRs that need help to proceed.
    on May 28, 2018
  8. jasnell commented on Jun 19, 2020

    @jasnell
    Member

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

  9. benjamingr commented on Jun 21, 2020

    @benjamingr
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedIssues that need assistance from volunteers or PRs that need help to proceed.post-mortemIssues and PRs related to Node.js postmortem diagnostics.windowsIssues and PRs related to the Windows platform.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions