diff options
author | Scott Blomquist <sblom@microsoft.com> | 2012-11-21 00:27:22 +0100 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2012-11-21 01:21:53 +0100 |
commit | f657ce685dddc1bf2d5b42f56d728df9176cceb9 (patch) | |
tree | ff03ca0dcd8c3260257c9b8c9e842829e7372db8 /configure | |
parent | bc9388342f59ed5c69d69c7095e5a17fcbd80ba8 (diff) | |
download | node-new-f657ce685dddc1bf2d5b42f56d728df9176cceb9.tar.gz |
windows: add tracing with performance counters
Patch by Henry Rawas and Scott Blomquist.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 22 |
1 files changed, 20 insertions, 2 deletions
@@ -211,6 +211,16 @@ parser.add_option("--without-etw", dest="without_etw", help="Build without ETW") +parser.add_option("--with-perfctr", + action="store_true", + dest="with_perfctr", + help="Build with performance counters (default is true on Windows)") + +parser.add_option("--without-perfctr", + action="store_true", + dest="without_perfctr", + help="Build without performance counters") + # CHECKME does this still work with recent releases of V8? parser.add_option("--gdb", action="store_true", @@ -454,7 +464,7 @@ def configure_node(o): o['variables']['node_use_systemtap'] = b(options.with_dtrace) if options.systemtap_includes: o['include_dirs'] += [options.systemtap_includes] - elif b(options.with_dtrace) == 'true': + elif options.with_dtrace: raise Exception( 'DTrace is currently only supported on SunOS or Linux systems.') else: @@ -467,11 +477,19 @@ def configure_node(o): # By default, enable ETW on Windows. if sys.platform.startswith('win32'): o['variables']['node_use_etw'] = b(not options.without_etw); - elif b(options.with_etw) == 'true': + elif options.with_etw: raise Exception('ETW is only supported on Windows.') else: o['variables']['node_use_etw'] = 'false' + # By default, enable Performance counters on Windows. + if sys.platform.startswith('win32'): + o['variables']['node_use_perfctr'] = b(not options.without_perfctr); + elif options.with_perfctr: + raise Exception('Performance counter is only supported on Windows.') + else: + o['variables']['node_use_perfctr'] = 'false' + def configure_libz(o): o['variables']['node_shared_zlib'] = b(options.shared_zlib) |