From 0ed5e823a263dd0d6747b2cf2ca3264b792042d2 Mon Sep 17 00:00:00 2001 From: Doug Cook Date: Thu, 18 Mar 2021 16:38:55 -0600 Subject: kcs - add sha256, cleanup, use Ctrpp task - Set FileDigestAlgorithm=sha256 - Replace custom "Run Ctrpp" task with Ctrpp task. - Minor cleanup and comments. --- general/perfcounters/kcs/kcs.c | 21 +++++++---- general/perfcounters/kcs/kcs.h | 8 ++--- general/perfcounters/kcs/kcs.rc | 2 +- general/perfcounters/kcs/kcs.vcxproj | 54 +++++++++++++++++++++++----- general/perfcounters/kcs/kcs.vcxproj.Filters | 10 ++++++ 5 files changed, 76 insertions(+), 19 deletions(-) diff --git a/general/perfcounters/kcs/kcs.c b/general/perfcounters/kcs/kcs.c index ae4405b9..4c5d5f7b 100644 --- a/general/perfcounters/kcs/kcs.c +++ b/general/perfcounters/kcs/kcs.c @@ -25,7 +25,7 @@ Environment: #include #include "kcs.h" -#include "kcsCounters.h" +#include // Generated by running ctrpp.exe kcs.man #pragma code_seg("PAGE") @@ -44,7 +44,8 @@ KcsAddGeometricInstance ( Routine Description: - This utility function adds instance to the callback buffer. + This utility function computes the value of a synthetic counter + instance and adds the value to the PCW buffer. Arguments: @@ -93,7 +94,11 @@ KcsGeometricWaveCallback ( Routine Description: - This function returns the list of counter instances and counter data. + This function is called by PCW.sys when a consumer is collecting data + from the GeometricWave counterset. + + This function collects the requested information and adds it to the provided + buffer. Arguments: @@ -201,7 +206,8 @@ KcsAddTrignometricInstance ( Routine Description: - This utility function adds instance to the callback buffer. + This utility function computes the value of a synthetic counter + instance and adds the value to the PCW buffer. Arguments: @@ -264,7 +270,11 @@ KcsTrignometricWaveCallback ( Routine Description: - This function returns the list of counter instances and counter data. + This function is called by PCW.sys when a consumer is collecting data + from the TrignometricWave counterset. + + This function collects the requested information and adds it to the provided + buffer. Arguments: @@ -404,4 +414,3 @@ Return Value: return STATUS_SUCCESS; } - diff --git a/general/perfcounters/kcs/kcs.h b/general/perfcounters/kcs/kcs.h index 4d845cc3..12c1cad1 100644 --- a/general/perfcounters/kcs/kcs.h +++ b/general/perfcounters/kcs/kcs.h @@ -22,13 +22,13 @@ Environment: --*/ -typedef struct _GEOMETRIC_WAVE_VALUES { +typedef struct GEOMETRIC_WAVE_VALUES { ULONG Square; ULONG Triangle; -} GEOMETRIC_WAVE_VALUES, *PGEOMETRIC_WAVE_VALUES; +} GEOMETRIC_WAVE_VALUES; -typedef struct _TRIGNOMETRIC_WAVE_VALUES { +typedef struct TRIGNOMETRIC_WAVE_VALUES { ULONG Constant; ULONG Cosine; ULONG Sine; -} TRIGNOMETRIC_WAVE_VALUES, *PTRIGNOMETRIC_WAVE_VALUES; \ No newline at end of file +} TRIGNOMETRIC_WAVE_VALUES; diff --git a/general/perfcounters/kcs/kcs.rc b/general/perfcounters/kcs/kcs.rc index 7c19d061..86e8008f 100644 --- a/general/perfcounters/kcs/kcs.rc +++ b/general/perfcounters/kcs/kcs.rc @@ -1 +1 @@ -#include "kcsCounters.rc" +#include // Generated by running ctrpp.exe kcs.man diff --git a/general/perfcounters/kcs/kcs.vcxproj b/general/perfcounters/kcs/kcs.vcxproj index e97abb07..6afa9d83 100644 --- a/general/perfcounters/kcs/kcs.vcxproj +++ b/general/perfcounters/kcs/kcs.vcxproj @@ -74,7 +74,11 @@ - + + + Manifest + + kcs @@ -128,31 +132,65 @@ + + sha256 + + + Kcs + $(IntDir)%(Filename)Counters.h + true + $(IntDir)%(Filename)_counterIds.h + $(IntDir)%(Filename)Counters.rc + + + sha256 + + + Kcs + $(IntDir)%(Filename)Counters.h + true + $(IntDir)%(Filename)_counterIds.h + $(IntDir)%(Filename)Counters.rc + + + sha256 + + + Kcs + $(IntDir)%(Filename)Counters.h + true + $(IntDir)%(Filename)_counterIds.h + $(IntDir)%(Filename)Counters.rc + + + sha256 + + + Kcs + $(IntDir)%(Filename)Counters.h + true + $(IntDir)%(Filename)_counterIds.h + $(IntDir)%(Filename)Counters.rc + - - - $([System.IO.Path]::GetDirectoryName($(ProjectDir)\$(IntDir))) - - - @@ -170,4 +208,4 @@ - + \ No newline at end of file diff --git a/general/perfcounters/kcs/kcs.vcxproj.Filters b/general/perfcounters/kcs/kcs.vcxproj.Filters index 0a2b4eef..c4daa27c 100644 --- a/general/perfcounters/kcs/kcs.vcxproj.Filters +++ b/general/perfcounters/kcs/kcs.vcxproj.Filters @@ -28,4 +28,14 @@ Resource Files + + + Header Files + + + + + Resource Files + + \ No newline at end of file -- cgit v1.3.1