[NTOS:KE]

- Fix swapped parameters of KeSetIntervalProfile
- Calculate the correct bucket pointer in KiParseProfileList, and actually increment the counter
CORE-10066

svn path=/trunk/; revision=68859
This commit is contained in:
Thomas Faber 2015-08-29 14:30:29 +00:00
parent a2833fad4b
commit e693a9b767
2 changed files with 7 additions and 7 deletions

View file

@ -399,8 +399,8 @@ KeQueryIntervalProfile(KPROFILE_SOURCE ProfileSource);
VOID
NTAPI
KeSetIntervalProfile(
KPROFILE_SOURCE ProfileSource,
ULONG Interval
ULONG Interval,
KPROFILE_SOURCE ProfileSource
);
VOID

View file

@ -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)++;
}
}