-
Notifications
You must be signed in to change notification settings - Fork 204
Handle V8 heap snapshots well + allow custom snapshot generation #207
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
Merged
Merged
Changes from 7 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
b405a34
Allow to create snapshots and re-use them
stesie 39062b4
Test for snapshot support in V8
stesie 2c8ef2a
conditionally compile in snapshot functionality
stesie 52ebdc2
Simply v8::Isolate::New to test if snapshot blob needed
stesie 40f0f5e
Provide startup data loader for V8 < 4.6.76
stesie 93d3f95
Add CreateParams fields in v8js_ctx only if needed
stesie a1cdd75
Fix conditional compilation for snapshot=off
stesie 4df6e80
Add testcase on V8Js::createSnapshot
stesie d0e7801
Allow snapshot creation & use with V8 > 4.3.7
stesie 8e3e0c9
Add ZEND_ARG_INFO for V8Js::__construct 5th arg: snapshot_blob
stesie 606eb5a
Mention limitted snapshot availibility in README.md
stesie 930b450
refcount on snapshot_blob zval
stesie de0b8e2
Check V8_DIR/share/v8 for snapshot images as well
stesie f49d3b7
Update README.Linux.md for snapshot usage
stesie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,12 +2,13 @@ | |
| +----------------------------------------------------------------------+ | ||
| | PHP Version 5 | | ||
| +----------------------------------------------------------------------+ | ||
| | Copyright (c) 1997-2013 The PHP Group | | ||
| | Copyright (c) 1997-2016 The PHP Group | | ||
| +----------------------------------------------------------------------+ | ||
| | http://www.opensource.org/licenses/mit-license.php MIT License | | ||
| +----------------------------------------------------------------------+ | ||
| | Author: Jani Taskinen <[email protected]> | | ||
| | Author: Patrick Reilly <[email protected]> | | ||
| | Author: Stefan Siegl <[email protected]> | | ||
| +----------------------------------------------------------------------+ | ||
| */ | ||
|
|
||
|
|
@@ -67,6 +68,14 @@ struct v8js_ctx { | |
| std::vector<v8js_accessor_ctx *> accessor_list; | ||
| std::vector<struct _v8js_script *> script_objects; | ||
| char *tz; | ||
|
|
||
| #if PHP_V8_API_VERSION >= 4004044 | ||
| v8::Isolate::CreateParams create_params; | ||
| #ifdef PHP_V8_USE_EXTERNAL_STARTUP_DATA | ||
| v8::StartupData snapshot_blob; | ||
| #endif | ||
| #endif | ||
|
|
||
| #ifdef ZTS | ||
| void ***zts_ctx; | ||
| #endif | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
L1119 - L1124: I notice there is no argument defined for the new snapshot blob which is defined as a parameter above?