Author: tfaber
Date: Sat Aug 29 14:30:29 2015
New Revision: 68859
URL:
http://svn.reactos.org/svn/reactos?rev=68859&view=rev
Log:
[NTOS:KE]
- Fix swapped parameters of KeSetIntervalProfile
- Calculate the correct bucket pointer in KiParseProfileList, and actually increment the
counter
CORE-10066
Modified:
trunk/reactos/ntoskrnl/include/internal/ke.h
trunk/reactos/ntoskrnl/ke/profobj.c
Modified: trunk/reactos/ntoskrnl/include/internal/ke.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/ke.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/ke.h [iso-8859-1] Sat Aug 29 14:30:29 2015
@@ -399,8 +399,8 @@
VOID
NTAPI
KeSetIntervalProfile(
- KPROFILE_SOURCE ProfileSource,
- ULONG Interval
+ ULONG Interval,
+ KPROFILE_SOURCE ProfileSource
);
VOID
Modified: trunk/reactos/ntoskrnl/ke/profobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/profobj.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/profobj.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/profobj.c [iso-8859-1] Sat Aug 29 14:30:29 2015
@@ -261,8 +261,8 @@
VOID
NTAPI
-KeSetIntervalProfile(IN KPROFILE_SOURCE ProfileSource,
- IN ULONG Interval)
+KeSetIntervalProfile(IN ULONG Interval,
+ IN KPROFILE_SOURCE ProfileSource)
{
HAL_PROFILE_SOURCE_INTERVAL ProfileSourceInterval;
@@ -330,12 +330,12 @@
}
/* Get the Pointer to the Bucket Value representing this Program Counter */
- BucketValue = (PULONG)((((ULONG_PTR)Profile->Buffer +
- (ProgramCounter - (ULONG_PTR)Profile->RangeBase))
+ BucketValue = (PULONG)((ULONG_PTR)Profile->Buffer +
+ ((ProgramCounter - (ULONG_PTR)Profile->RangeBase)
> Profile->BucketShift) &~ 0x3);
/* Increment the value */
- ++BucketValue;
+ (*BucketValue)++;
}
}