Added back in ZippedETL (reader) to the .NET Core build.

This commit is contained in:
Vance Morrison
2016-08-04 09:44:58 -07:00
parent 919957b0dc
commit 781603e0cc
3 changed files with 12 additions and 8 deletions
+2 -1
View File
@@ -19,7 +19,8 @@
"../Parsers/KernelTraceEventParser.cs",
"../TraceEvent.cs",
"../ETWTraceEventSource.cs",
"../TraceEventNativeMethods.cs"
"../TraceEventNativeMethods.cs",
"../ZippedETL.cs"
],
"exclude": [ "obj", "../obj", "../**/*.Tests", "../Utilities/command.cs", "../../Utilities/DotNetCore.cs" ]
},
+7 -4
View File
@@ -1,5 +1,4 @@
using Microsoft.Diagnostics.Symbols;
using Microsoft.Diagnostics.Tracing.Session;
using Microsoft.Diagnostics.Utilities;
using System;
using System.Collections.Generic;
@@ -9,10 +8,13 @@ using System.IO.Compression;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace Microsoft.Diagnostics.Symbols { } // avoids compile errors in .NET Core build
#if V4_5_Runtime || PERFVIEW
namespace Microsoft.Diagnostics.Tracing
{
#if !NOT_WINDOWS
/// <summary>
/// ZippedETLWriter is a helper class used to compress ETW data (ETL files)
/// along with symbolic information (e.g. NGEN pdbs), as well as other optional
@@ -224,12 +226,12 @@ namespace Microsoft.Diagnostics.Tracing
var startTime = DateTime.UtcNow;
Log.WriteLine("Starting Merging of {0}", m_etlFilePath);
TraceEventMergeOptions options = TraceEventMergeOptions.None;
var options = Session.TraceEventMergeOptions.None;
if (CompressETL)
options |= TraceEventMergeOptions.Compress;
options |= Session.TraceEventMergeOptions.Compress;
// Do the merge
TraceEventSession.Merge(mergeInputs.ToArray(), tempName, options);
Session.TraceEventSession.Merge(mergeInputs.ToArray(), tempName, options);
Log.WriteLine("Merging took {0:f1} sec", (DateTime.UtcNow - startTime).TotalSeconds);
}
else
@@ -304,6 +306,7 @@ namespace Microsoft.Diagnostics.Tracing
string m_etlFilePath;
#endregion // private
}
#endif
/// <summary>
/// ZippedETLReader is a helper class that unpacks the ZIP files generated
+3 -3
View File
@@ -22,13 +22,13 @@ namespace Utilities
public static bool AtLeast(int requiredOSVersion)
{
#if !NOT_WINDOWS
int osVersion = Environment.OSVersion.Version.Major * 10 + Environment.OSVersion.Version.Minor;
int osVersion = Environment.OSVersion.Version.Major * 10 + Environment.OSVersion.Version.Minor;
#else
// FIX NOW. we assume we are on windows 10 if we ar running .NET Core
// Need to actually PINVOKE to something.
int osNum = 100;
int osVersion = 100;
#endif
return osVersion >= requiredOSVersion;
return osVersion >= requiredOSVersion;
}
}
}