Skip to content

Commit

Permalink
Merge pull request #386 from GameTechDev/feature/merge-candidate-omni
Browse files Browse the repository at this point in the history
Feature/merge candidate omni
  • Loading branch information
markgalvan-intel authored Jan 8, 2025
2 parents b71fc43 + 66d88c5 commit ae2cbc5
Show file tree
Hide file tree
Showing 59 changed files with 5,094 additions and 411 deletions.
16 changes: 12 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,20 @@ ipch/
*.vspx
*.sap


# Commandline extension args
IntelPresentMon/AppCef/CefNano.args.json
IntelPresentMon/PresentMonService/PresentMonService.args.json
PresentMon/PresentMon.args.json
PresentData/PresentData.args.json

# Make sure internal source isn't unintentionally committed to public repositories
IntelPresentMon/PresentMonAPI2/Internal.h

# Reflector Tool
Reflector/bin/**
Reflector/obj/**

# Misc ephermeral files
IntelPresentMon/SampleClient/log.txt

IntelPresentMon/PresentMonAPI2/Internal.h
ETLTrimmer/Release/ETLTrimmer.Build.CppClean.log

ETLTrimmer/Release/ETLTrimmer.vcxproj.FileListAbsolute.txt
2 changes: 2 additions & 0 deletions ETLTrimmer/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.etl
/x64
30 changes: 30 additions & 0 deletions ETLTrimmer/CliOptions.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#pragma once
#include "../IntelPresentMon/CommonUtilities/cli/CliFramework.h"
#include <ranges>

namespace clio
{
using namespace pmon::util::cli;
struct Options : public OptionsBase<Options>
{
private: Group gf_{ this, "Files", "Input and output file paths" }; public:
Option<std::string> inputFile{ this, "--input-file", "", "Path to input file to use", [this](CLI::Option* pOpt) {
pOpt->required();
} };
Option<std::string> outputFile{ this, "--output-file", "", "Path for the trimmed output file. Omitting this enables analysis-only mode" };

private: Group gt_{ this, "Trimming", "Options for trimming and pruning events" }; public:
Flag provider{ this, "--provider,-p", "Enable pruning by provider (uses same provider set as PresentMon)" };
Flag event{ this, "--event,-e", "Enable pruning by event (uses same event set as PresentMon)" };
Flag trimState{ this, "--trim-state,-s", "Override default behavior that avoids discarding stateful events like process and DC start/stop when trimming by timestamp range" };
Option<std::pair<uint64_t, uint64_t>> trimRangeQpc{ this, "--trim-range-qpc", {}, "Range of QPC timestamps outside of which to trim", RemoveCommas };
Option<std::pair<uint64_t, uint64_t>> trimRangeNs{ this, "--trim-range-ns", {}, "Range of nanosecond times outside of which to trim", RemoveCommas };
Option<std::pair<double, double>> trimRangeMs{ this, "--trim-range-ms", {}, "Range of millisecond times outside of which to trim" };

static constexpr const char* description = "Postprocessing tool for trimming and pruning ETL files";
static constexpr const char* name = "ETLTrimmer.exe";
private:
Dependency eventDep_{ event, provider };
MutualExclusion trimRangeExcl_{ trimRangeQpc, trimRangeNs, trimRangeMs };
};
}
38 changes: 38 additions & 0 deletions ETLTrimmer/ETLTrimmer.args.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"FileVersion": 2,
"Id": "f9bd47f5-4aa3-4ba3-91f2-2ac7b270299c",
"Items": [
{
"Id": "0f02ddbd-6110-43dd-982a-900bffd8549c",
"Command": "--input-file original.etl"
},
{
"Id": "ca527fdf-cf0c-4bc6-a5e5-362394a8487d",
"Command": "--output-file output-trim-start.etl"
},
{
"Id": "df1b242f-0b8c-4871-9bf8-6877fca7a4f1",
"Command": "--trim-range-qpc 114450000000 114550000000"
},
{
"Id": "fc5883f2-a0e9-4d45-8e95-199ec1c499d2",
"Command": "--trim-range-ms 15000 17000"
},
{
"Id": "d5415649-1bf4-47d6-bf82-fcdaba5ee851",
"Command": "--trim-range-ns 15,000,000,000 17,000,000,000"
},
{
"Id": "a220f802-99a4-436a-b30f-821a39c2042e",
"Command": "-pe"
},
{
"Id": "72aa3f3a-db72-48e5-93ec-11ef00ccf00e",
"Command": "--trim-state"
},
{
"Id": "ee3aa6c6-1568-4347-8847-ad556ceedbdd",
"Command": "--help"
}
]
}
178 changes: 178 additions & 0 deletions ETLTrimmer/ETLTrimmer.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>17.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{f9bd47f5-4aa3-4ba3-91f2-2ac7b270299c}</ProjectGuid>
<RootNamespace>ETLTrimmer</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\vcpkg.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\vcpkg.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>..\build\$(Configuration)\</OutDir>
<IntDir>..\build\obj\$(ProjectName)-$(Platform)-$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>..\build\$(Configuration)\</OutDir>
<IntDir>..\build\obj\$(ProjectName)-$(Platform)-$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Label="Vcpkg">
<VcpkgEnabled>true</VcpkgEnabled>
<VcpkgEnableManifest>true</VcpkgEnableManifest>
</PropertyGroup>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<VcpkgUseStatic>true</VcpkgUseStatic>
<VcpkgHostTriplet>x64-windows-static</VcpkgHostTriplet>
</PropertyGroup>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<VcpkgUseStatic>true</VcpkgUseStatic>
<VcpkgHostTriplet>x64-windows-static</VcpkgHostTriplet>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpplatest</LanguageStandard>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpplatest</LanguageStandard>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpplatest</LanguageStandard>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>tdh.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpplatest</LanguageStandard>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>tdh.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="main.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\IntelPresentMon\CommonUtilities\CommonUtilities.vcxproj">
<Project>{08a704d8-ca1c-45e9-8ede-542a1a43b53e}</Project>
</ProjectReference>
<ProjectReference Include="..\PresentData\PresentData.vcxproj">
<Project>{892028e5-32f6-45fc-8ab2-90fcbcac4bf6}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ClInclude Include="CliOptions.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
27 changes: 27 additions & 0 deletions ETLTrimmer/ETLTrimmer.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="CliOptions.h">
<Filter>Source Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
Loading

0 comments on commit ae2cbc5

Please sign in to comment.