Skip to content

Commit

Permalink
http2: switch to new runtime-controlled debugging system
Browse files Browse the repository at this point in the history
Remove `--debug-http2` as a compile-time feature and
make all debug statements available using `NODE_DEBUG_NATIVE=http2`
at runtime.

This probably makes the debugging-enabled case a bit slower due to
additional string concatenations, but switching to a runtime-checking
system makes debugging more flexible and can be applied more easily
to other parts of the source code as well.

PR-URL: #20987
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
addaleax committed May 31, 2018
1 parent 45eeea4 commit 182c73b
Show file tree
Hide file tree
Showing 6 changed files with 115 additions and 154 deletions.
10 changes: 0 additions & 10 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -443,11 +443,6 @@ parser.add_option('--debug-lib',
dest='node_debug_lib',
help='build lib with DCHECK macros')

http2_optgroup.add_option('--debug-http2',
action='store_true',
dest='debug_http2',
help='build with http2 debug statements on (default is false)')

http2_optgroup.add_option('--debug-nghttp2',
action='store_true',
dest='debug_nghttp2',
Expand Down Expand Up @@ -970,11 +965,6 @@ def configure_node(o):

o['variables']['node_debug_lib'] = b(options.node_debug_lib)

if options.debug_http2:
o['variables']['debug_http2'] = 1
else:
o['variables']['debug_http2'] = 'false'

if options.debug_nghttp2:
o['variables']['debug_nghttp2'] = 1
else:
Expand Down
4 changes: 0 additions & 4 deletions node.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,6 @@
'NODE_RELEASE_URLBASE="<(node_release_urlbase)"',
]
}],
[
'debug_http2==1', {
'defines': [ 'NODE_DEBUG_HTTP2=1' ]
}],
[ 'v8_enable_i18n_support==1', {
'defines': [ 'NODE_HAVE_I18N_SUPPORT=1' ],
'dependencies': [
Expand Down
Loading

0 comments on commit 182c73b

Please sign in to comment.