This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
systemtap/dtrace support for nodejs #4164
Closed
Closed
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
ef042d8
This will add systemtap/dtrace support for nodejs, more work needs to…
1b865d4
style whitespace and license fixes
81ca7c2
removed _sema.o object creation and linking
61e9e9e
compiles! notes section probes! really lame macro guards.
8f13b8a
removed unneeded _sema.o object in node.gyp
7631263
fully merged node_systemtap.cc with node_dtrace.cc
55761fc
compiler warnings fixed (all bnoordhuis, thanks!)
35916e7
added probe existence test to comments in .d
8e7e00e
crucial miss of InitDtrace and HAVE_SYSTEMTAP
bf7602c
license boilerplate
e40982f
dtrace header to Release/gen
9ca1279
cleanup comments
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 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 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 |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
'node_shared_v8%': 'false', | ||
'node_shared_zlib%': 'false', | ||
'node_use_openssl%': 'true', | ||
'node_use_systemtap%': 'false', | ||
'node_shared_openssl%': 'false', | ||
'library_files': [ | ||
'src/node.js', | ||
|
@@ -146,7 +147,6 @@ | |
}, { | ||
'defines': [ 'HAVE_OPENSSL=0' ] | ||
}], | ||
|
||
[ 'node_use_dtrace=="true"', { | ||
'defines': [ 'HAVE_DTRACE=1' ], | ||
'dependencies': [ 'node_dtrace_header' ], | ||
|
@@ -168,6 +168,17 @@ | |
} | ||
] ], | ||
} ], | ||
[ 'node_use_systemtap=="true"', { | ||
'defines': [ 'HAVE_SYSTEMTAP=1', 'STAP_SDT_V1' ], | ||
'dependencies': [ 'node_systemtap_header' ], | ||
'dependencies': [ 'node_systemtap_object' ], | ||
'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ], | ||
'libraries': [ '<(PRODUCT_DIR)/obj.target/node/src/node_systemtap_sema.o' ], | ||
'sources': [ | ||
'src/node_systemtap.cc', | ||
'src/node_systemtap.h', | ||
], | ||
} ], | ||
[ 'node_use_etw=="true"', { | ||
'defines': [ 'HAVE_ETW=1' ], | ||
'dependencies': [ 'node_etw' ], | ||
|
@@ -282,7 +293,7 @@ | |
# action? | ||
|
||
'conditions': [ | ||
[ 'node_use_dtrace=="true" or node_use_etw=="true"', { | ||
[ 'node_use_dtrace=="true" or node_use_etw=="true" or node_use_systemtap=="true"', { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Long line, wrap at 80 columns like this: [ 'node_use_dtrace=="true"'
' or node_use_etw=="true"'
' or node_use_systemtap=="true"',
{ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here's a diff: diff --git a/node.gyp b/node.gyp
index f2f6255..07c89d3 100644
--- a/node.gyp
+++ b/node.gyp
@@ -293,7 +293,10 @@
# action?
'conditions': [
- [ 'node_use_dtrace=="true" or node_use_etw=="true" or node_use_systemtap=="true"', {
+ [ 'node_use_dtrace=="true"'
+ ' or node_use_etw=="true"'
+ ' or node_use_systemtap=="true"',
+ {
'action': [
'python',
'tools/js2c.py', |
||
'action': [ | ||
'python', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Won't this break sunos+dtrace builds? |
||
'tools/js2c.py', | ||
|
@@ -295,7 +306,6 @@ | |
'tools/js2c.py', | ||
'<@(_outputs)', | ||
'<@(_inputs)', | ||
'src/macros.py' | ||
], | ||
}] | ||
], | ||
|
@@ -319,6 +329,40 @@ | |
} ] | ||
] | ||
}, | ||
{ | ||
'target_name': 'node_systemtap_header', | ||
'type': 'none', | ||
'conditions': [ | ||
[ 'node_use_systemtap=="true"', { | ||
'actions': [ | ||
{ | ||
'action_name': 'node_systemtap_header', | ||
'inputs': [ 'src/node_systemtap.d' ], | ||
'outputs': [ 'src/node_systemtap.h' ], | ||
'action': [ 'dtrace', '-h', '-C', '-s', '<@(_inputs)', | ||
'-o', '<@(_outputs)' ] | ||
} | ||
] | ||
} ] | ||
] | ||
}, | ||
{ | ||
'target_name': 'node_systemtap_object', | ||
'type': 'none', | ||
'conditions': [ | ||
[ 'node_use_systemtap=="true"', { | ||
'actions': [ | ||
{ | ||
'action_name': 'node_systemtap_o', | ||
'inputs': [ 'src/node_systemtap.d' ], | ||
'outputs': [ '<(PRODUCT_DIR)/obj.target/node/src/node_systemtap_sema.o' ], | ||
'action': [ 'dtrace', '-G', '-s', '<@(_inputs)', | ||
'-o', '<@(_outputs)' ] | ||
} | ||
] | ||
} ] | ||
] | ||
}, | ||
{ | ||
'target_name': 'node_dtrace_provider', | ||
'type': 'none', | ||
|
This file contains 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
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.
A
--with-systemtap
configure switch is preferable over piggybacking on the--with-dtrace
switch.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.
No, skip that. I guess it doesn't matter much from an end user perspective.