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 /tools | |
parent | bc9388342f59ed5c69d69c7095e5a17fcbd80ba8 (diff) | |
download | nodejs-f657ce685dddc1bf2d5b42f56d728df9176cceb9.tar.gz nodejs-f657ce685dddc1bf2d5b42f56d728df9176cceb9.tar.bz2 nodejs-f657ce685dddc1bf2d5b42f56d728df9176cceb9.zip |
windows: add tracing with performance counters
Patch by Henry Rawas and Scott Blomquist.
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/js2c.py | 8 | ||||
-rw-r--r-- | tools/msvs/msi/nodemsi.wixproj | 8 | ||||
-rwxr-xr-x | tools/msvs/msi/product.wxs | 5 |
3 files changed, 15 insertions, 6 deletions
diff --git a/tools/js2c.py b/tools/js2c.py index 3406373b7..7c83c67ba 100755 --- a/tools/js2c.py +++ b/tools/js2c.py @@ -266,13 +266,17 @@ def JS2C(source, target): # Locate the macros file name. consts = {} macros = {} + macro_lines = [] for s in source: - if 'macros.py' == (os.path.split(str(s))[1]): - (consts, macros) = ReadMacros(ReadLines(str(s))) + if (os.path.split(str(s))[1]).endswith('macros.py'): + macro_lines.extend(ReadLines(str(s))) else: modules.append(s) + # Process input from all *macro.py files + (consts, macros) = ReadMacros(macro_lines) + # Build source code lines source_lines = [ ] source_lines_empty = [] diff --git a/tools/msvs/msi/nodemsi.wixproj b/tools/msvs/msi/nodemsi.wixproj index 7cc35c07e..3f9b0dd4e 100644 --- a/tools/msvs/msi/nodemsi.wixproj +++ b/tools/msvs/msi/nodemsi.wixproj @@ -16,22 +16,22 @@ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <OutputPath>..\..\..\$(Configuration)\</OutputPath> <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath> - <DefineConstants>Debug;ProductVersion=$(NodeVersion);NoETW=$(NoETW);NPMSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFilesFolder</DefineConstants> + <DefineConstants>Debug;ProductVersion=$(NodeVersion);NoETW=$(NoETW);NoPerfCtr=$(NoPerfCtr);NPMSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFilesFolder</DefineConstants> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <OutputPath>..\..\..\$(Configuration)\</OutputPath> <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath> - <DefineConstants>Debug;ProductVersion=$(NodeVersion);NoETW=$(NoETW);NPMSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFilesFolder</DefineConstants> + <DefineConstants>Debug;ProductVersion=$(NodeVersion);NoETW=$(NoETW);NoPerfCtr=$(NoPerfCtr);NPMSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFilesFolder</DefineConstants> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> <OutputPath>..\..\..\$(Configuration)\</OutputPath> <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath> - <DefineConstants>Debug;ProductVersion=$(NodeVersion);NoETW=$(NoETW);NPMSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFiles64Folder</DefineConstants> + <DefineConstants>Debug;ProductVersion=$(NodeVersion);NoETW=$(NoETW);NoPerfCtr=$(NoPerfCtr);NPMSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFiles64Folder</DefineConstants> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> <OutputPath>..\..\..\$(Configuration)\</OutputPath> <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath> - <DefineConstants>Debug;ProductVersion=$(NodeVersion);NoETW=$(NoETW);NPMSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFiles64Folder</DefineConstants> + <DefineConstants>Debug;ProductVersion=$(NodeVersion);NoETW=$(NoETW);NoPerfCtr=$(NoPerfCtr);NPMSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFiles64Folder</DefineConstants> </PropertyGroup> <ItemGroup> <Compile Include="product.wxs" /> diff --git a/tools/msvs/msi/product.wxs b/tools/msvs/msi/product.wxs index 443739dc2..466800855 100755 --- a/tools/msvs/msi/product.wxs +++ b/tools/msvs/msi/product.wxs @@ -48,6 +48,11 @@ <util:EventManifest MessageFile="[APPLICATIONROOTDIRECTORY]node.exe" ResourceFile="[APPLICATIONROOTDIRECTORY]node.exe"/> </File> <?endif?> + <?if $(var.NoPerfCtr) != 1 ?> + <File Id="node_perfctr_provider_man" Name="node_perfctr_provider.man" Source="$(var.RepoDir)\src\res\node_perfctr_provider.man" > + <util:PerfCounterManifest ResourceFileDirectory="[APPLICATIONROOTDIRECTORY]"/> + </File> + <?endif?> <Environment Id="npm_env" Action="set" Name="PATH" |