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

[TIMOB-12145] kroll.writeSnapshot method for heap dump #9277

Closed
wants to merge 2 commits into from

Conversation

drauggres
Copy link
Contributor

JIRA: https://jira.appcelerator.org/browse/TIMOB-12145

var path = Ti.Filesystem.tempDirectory.replace('file://', '') +
  '/' + Date.now() + '.heapsnapshot';
if (kroll.writeSnapshot(path)) {
  console.log('Heap snapshot successfully dumped to', path);
} else {
  console.error('Failed to dump heap snapshot to', path);
}

@drauggres drauggres changed the title [TIMOB-12145] kroll.writeSnapshot method for head dump [TIMOB-12145] kroll.writeSnapshot method for heap dump Aug 4, 2017
@sgtcoolguy
Copy link
Contributor

I assume this is sort of a port of this node native module? https://github.com/bnoordhuis/node-heapdump/blob/master/src/heapdump.cc

It looks like a nice low-level utility to inspecting state when imported into Chrome's dev tools...

Just thinking out loud here:
Are we sure we want this in the core of the SDK off the kroll object? Maybe it could be an android native module like the package above is a node module?

@sgtcoolguy sgtcoolguy modified the milestones: 7.0.0, 7.1.0 Nov 30, 2017
@drauggres
Copy link
Contributor Author

Obsolete.
Steps for taking js heapsnapshot in Ti SDK 7:

  1. run ti build with --debug-host localhost:8989
  2. open chrome-devtools:// link in chrome/chromium
  3. in Memory tab click Take snapshot

I think thats enough for debugging purposes.

@drauggres drauggres closed this Dec 20, 2017
@drauggres drauggres deleted the TIMOB-12145 branch December 20, 2017 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants