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

src: export v8.GetHeapCodeAndMetadataStatistics() #27978

Closed
wants to merge 1 commit into from

Conversation

yvasiyarov
Copy link

Export statistic provided by V8 through HeapCodeStatistics class and
and GetHeapCodeAndMetadataStatistics function to v8 Node.js module

Checklist
  • [x ] make -j4 test (UNIX), or vcbuild test (Windows) passes
  • [x ] tests and/or benchmarks are included
  • [x ] documentation is changed or added
  • [x ] commit message follows commit guidelines

@jasnell jasnell requested review from bnoordhuis and addaleax May 31, 2019 05:29
doc/api/v8.md Outdated Show resolved Hide resolved
src/node_v8.cc Show resolved Hide resolved
@yvasiyarov yvasiyarov force-pushed the heap_code_and_metadata branch from 472d571 to e8bb983 Compare May 31, 2019 09:34
Copy link
Member

@addaleax addaleax left a comment

Choose a reason for hiding this comment

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

Looks good code-wise, although I have to admit to not really being sure about what use cases there are

@nodejs-github-bot
Copy link
Collaborator

@yvasiyarov
Copy link
Author

@addaleax main use case here is monitoring of node.js applications.
I wanna achieve better observability of Node.js applications: better understand where do we spend memory and why. At the moment it's not clear.

lib/v8.js Outdated
kNumberOfDetachedContextsIndex

// Properties for heap code statistics buffer extraction.
kCodenAndMetadataSizeIndex,
Copy link
Member

Choose a reason for hiding this comment

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

Typo: kCodeAndMetadataSizeIndex (no n after kCode)

Copy link
Author

Choose a reason for hiding this comment

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

@bnoordhuis typo fixed. Commit squashed with original commit

@addaleax addaleax added c++ Issues and PRs that require attention from people who are familiar with C++. semver-minor PRs that contain new features and should be released in the next minor version. v8 engine Issues and PRs related to the V8 dependency. labels Jun 2, 2019
Export statistic provided by V8 through HeapCodeStatistics class and
and GetHeapCodeAndMetadataStatistics function to v8 Node.js module
@yvasiyarov yvasiyarov force-pushed the heap_code_and_metadata branch from e8bb983 to 07967f6 Compare June 4, 2019 12:05
@yvasiyarov
Copy link
Author

Guys,
is there anything I can do get this PR merged ?
Or its not going to be merged at all ?

@nodejs-github-bot
Copy link
Collaborator

@joyeecheung
Copy link
Member

@yvasiyarov with three approvals it should be ready to land as long as the CI is green (I started one).

Trott pushed a commit to Trott/io.js that referenced this pull request Jul 30, 2019
Export statistic provided by V8 through HeapCodeStatistics class and
and GetHeapCodeAndMetadataStatistics function to v8 Node.js module

PR-URL: nodejs#27978
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
@Trott
Copy link
Member

Trott commented Jul 30, 2019

Landed in 21a7c69.

Thanks for the contribution! 🎉

targos pushed a commit that referenced this pull request Aug 2, 2019
Export statistic provided by V8 through HeapCodeStatistics class and
and GetHeapCodeAndMetadataStatistics function to v8 Node.js module

PR-URL: #27978
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
BridgeAR added a commit that referenced this pull request Aug 6, 2019
Notable changes:

* assert:
  * Legacy mode deprecation (`DEP0089`) is revoked (Colin Ihrig)
    #28892
* crypto:
  * The `outputLength` option is added to `crypto.createHash`
    (Tobias Nießen) #28805
  * The `maxmem` range is increased from 32 to 53 bits (Tobias Nießen)
    #28799
* n-api:
  * Added APIs for per-instance state management (Gabriel Schulhof)
    #28682
* report:
  * Network interfaces get included in the report (cjihrig)
    #28911
* src:
  * `v8.getHeapCodeStatistics()` is now exported
    (Yuriy Vasiyarov) #27978

PR-URL: #29017
BridgeAR added a commit to BridgeAR/node that referenced this pull request Aug 6, 2019
Notable changes:

* assert:
  * Legacy mode deprecation (`DEP0089`) is revoked (Colin Ihrig)
    nodejs#28892
* crypto:
  * The `outputLength` option is added to `crypto.createHash`
    (Tobias Nießen) nodejs#28805
  * The `maxmem` range is increased from 32 to 53 bits (Tobias Nießen)
    nodejs#28799
* n-api:
  * Added APIs for per-instance state management (Gabriel Schulhof)
    nodejs#28682
* report:
  * Network interfaces get included in the report (cjihrig)
    nodejs#28911
* src:
  * `v8.getHeapCodeStatistics()` is now exported
    (Yuriy Vasiyarov) nodejs#27978

PR-URL: nodejs#29017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. semver-minor PRs that contain new features and should be released in the next minor version. v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants