diff --git a/reactos/ntoskrnl/include/internal/ke.h b/reactos/ntoskrnl/include/internal/ke.h index 4475c1ce1bf..6d4590a268e 100644 --- a/reactos/ntoskrnl/include/internal/ke.h +++ b/reactos/ntoskrnl/include/internal/ke.h @@ -399,8 +399,8 @@ KeQueryIntervalProfile(KPROFILE_SOURCE ProfileSource); VOID NTAPI KeSetIntervalProfile( - KPROFILE_SOURCE ProfileSource, - ULONG Interval + ULONG Interval, + KPROFILE_SOURCE ProfileSource ); VOID diff --git a/reactos/ntoskrnl/ke/profobj.c b/reactos/ntoskrnl/ke/profobj.c index d137e12836d..6be1deedb60 100644 --- a/reactos/ntoskrnl/ke/profobj.c +++ b/reactos/ntoskrnl/ke/profobj.c @@ -261,8 +261,8 @@ KeQueryIntervalProfile(IN KPROFILE_SOURCE ProfileSource) 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 @@ KiParseProfileList(IN PKTRAP_FRAME TrapFrame, } /* 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)++; } }