Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

profobj.c File Reference

#include "ki.h"

Go to the source code of this file.

Classes

struct  _KACTIVE_PROFILE_SOURCE

Defines

#define ASSERT_PROFILE(E)

Typedefs

typedef _KACTIVE_PROFILE_SOURCE KACTIVE_PROFILE_SOURCE
typedef _KACTIVE_PROFILE_SOURCEPKACTIVE_PROFILE_SOURCE

Functions

VOID KiStartProfileInterrupt (IN PKIPI_CONTEXT SignalDone, IN PVOID Parameter1, IN PVOID Parameter2, IN PVOID Parameter3)
VOID KiStopProfileInterrupt (IN PKIPI_CONTEXT SignalDone, IN PVOID Parameter1, IN PVOID Parameter2, IN PVOID Parameter3)
VOID KeInitializeProfile (IN PKPROFILE Profile, IN PKPROCESS Process OPTIONAL, IN PVOID RangeBase, IN SIZE_T RangeSize, IN ULONG BucketSize, IN ULONG Segment, IN KPROFILE_SOURCE ProfileSource, IN KAFFINITY ProfileAffinity)
ULONG KeQueryIntervalProfile (IN KPROFILE_SOURCE ProfileSource)
VOID KeSetIntervalProfile (IN ULONG Interval, IN KPROFILE_SOURCE Source)
BOOLEAN KeStartProfile (IN PKPROFILE Profile, IN PULONG Buffer)
BOOLEAN KeStopProfile (IN PKPROFILE Profile)


Define Documentation

#define ASSERT_PROFILE  ) 
 

Value:

{ \ ASSERT((E)->Type == ProfileObject); \ }

Definition at line 34 of file profobj.c.

Referenced by KeStartProfile(), and KeStopProfile().


Typedef Documentation

typedef struct _KACTIVE_PROFILE_SOURCE KACTIVE_PROFILE_SOURCE
 

typedef struct _KACTIVE_PROFILE_SOURCE * PKACTIVE_PROFILE_SOURCE
 

Referenced by KeStartProfile(), and KeStopProfile().


Function Documentation

VOID KeInitializeProfile IN PKPROFILE  Profile,
IN PKPROCESS Process  OPTIONAL,
IN PVOID  RangeBase,
IN SIZE_T  RangeSize,
IN ULONG  BucketSize,
IN ULONG  Segment,
IN KPROFILE_SOURCE  ProfileSource,
IN KAFFINITY  ProfileAffinity
 

Definition at line 69 of file profobj.c.

References ASSERT, FALSE, KeActiveProcessors, NULL, and ProfileObject.

Referenced by NtStartProfile().

00082 : 00083 00084 This function initializes a kernel profile object. The process, 00085 address range, bucket size, and buffer are set. The profile is 00086 set to the stopped state. 00087 00088 Arguments: 00089 00090 Profile - Supplies a pointer to control object of type profile. 00091 00092 Process - Supplies an optional pointer to a process object that 00093 describes the address space to profile. If not specified, 00094 then all address spaces are included in the profile. 00095 00096 RangeBase - Supplies the address of the first byte of the address 00097 range for which profiling information is to be collected. 00098 00099 RangeSize - Supplies the size of the address range for which profiling 00100 information is to be collected. The RangeBase and RangeSize 00101 parameters are interpreted such that RangeBase <= address < 00102 RangeBase + RangeSize generates a profile hit. 00103 00104 BucketSize - Supplies the log base 2 of the size of a profiling bucket. 00105 Thus, BucketSize = 2 yields 4-byte buckets, BucketSize = 7 yields 00106 128-byte buckets. 00107 00108 Segment - Supplies the non-Flat code segment to profile. If this 00109 is zero, then the flat profiling is done. This will only 00110 be non-zero on an x86 machine. 00111 00112 ProfileSource - Supplies the profile interrupt source. 00113 00114 ProfileAffinity - Supplies the set of processor to count hits for. 00115 00116 Return Value: 00117 00118 None. 00119 00120 --*/ 00121 00122 { 00123 00124 #if !defined(i386) 00125 00126 ASSERT(Segment == 0); 00127 00128 #endif 00129 00130 // 00131 // Initialize the standard control object header. 00132 // 00133 00134 Profile->Type = ProfileObject; 00135 Profile->Size = sizeof(KPROFILE); 00136 00137 // 00138 // Initialize the process address space, range base, range limit, 00139 // bucket shift count, and set started FALSE. 00140 // 00141 00142 if (ARGUMENT_PRESENT(Process)) { 00143 Profile->Process = Process; 00144 00145 } else { 00146 Profile->Process = NULL; 00147 } 00148 00149 Profile->RangeBase = RangeBase; 00150 Profile->RangeLimit = (PUCHAR)RangeBase + RangeSize; 00151 Profile->BucketShift = BucketSize - 2; 00152 Profile->Started = FALSE; 00153 Profile->Segment = Segment; 00154 Profile->Source = (CSHORT)ProfileSource; 00155 Profile->Affinity = ProfileAffinity & KeActiveProcessors; 00156 if (Profile->Affinity == 0) { 00157 Profile->Affinity = KeActiveProcessors; 00158 } 00159 return; 00160 }

ULONG KeQueryIntervalProfile IN KPROFILE_SOURCE  ProfileSource  ) 
 

Definition at line 163 of file profobj.c.

References HAL_PROFILE_SOURCE_INFORMATION, HalProfileSourceInformation, HalQuerySystemInformation, _HAL_PROFILE_SOURCE_INFORMATION::Interval, KiProfileAlignmentFixupInterval, KiProfileInterval, NT_SUCCESS, NTSTATUS(), _HAL_PROFILE_SOURCE_INFORMATION::Source, Status, and _HAL_PROFILE_SOURCE_INFORMATION::Supported.

Referenced by NtQueryIntervalProfile().

00169 : 00170 00171 This function returns the profile sample interval the system is 00172 currently using. 00173 00174 Arguments: 00175 00176 ProfileSource - Supplies the profile source to be queried. 00177 00178 Return Value: 00179 00180 Sample interval in units of 100ns. 00181 00182 --*/ 00183 00184 { 00185 00186 HAL_PROFILE_SOURCE_INFORMATION ProfileSourceInfo; 00187 ULONG ReturnedLength; 00188 NTSTATUS Status; 00189 00190 if (ProfileSource == ProfileTime) { 00191 00192 // 00193 // Return the current sampling interval in 100ns units. 00194 // 00195 00196 return KiProfileInterval; 00197 00198 } else if (ProfileSource == ProfileAlignmentFixup) { 00199 return KiProfileAlignmentFixupInterval; 00200 00201 } else { 00202 00203 // 00204 // The HAL is responsible for tracking this profile interval. 00205 // 00206 00207 ProfileSourceInfo.Source = ProfileSource; 00208 Status = HalQuerySystemInformation(HalProfileSourceInformation, 00209 sizeof(HAL_PROFILE_SOURCE_INFORMATION), 00210 &ProfileSourceInfo, 00211 &ReturnedLength); 00212 00213 if (NT_SUCCESS(Status) && ProfileSourceInfo.Supported) { 00214 return ProfileSourceInfo.Interval; 00215 00216 } else { 00217 return 0; 00218 } 00219 } 00220 }

VOID KeSetIntervalProfile IN ULONG  Interval,
IN KPROFILE_SOURCE  Source
 

Definition at line 223 of file profobj.c.

References HAL_PROFILE_SOURCE_INTERVAL, HalProfileSourceInterval, HalSetProfileInterval(), HalSetSystemInformation, _HAL_PROFILE_SOURCE_INTERVAL::Interval, KiIpiGenericCall(), KiProfileAlignmentFixupInterval, KiProfileInterval, and _HAL_PROFILE_SOURCE_INTERVAL::Source.

Referenced by NtSetIntervalProfile().

00230 : 00231 00232 This function sets the profile sampling interval. The interval is in 00233 100ns units. The interval will actually be set to some value in a set 00234 of preset values (at least on pc based hardware), using the one closest 00235 to what the user asked for. 00236 00237 Arguments: 00238 00239 Interval - Supplies the length of the sampling interval in 100ns units. 00240 00241 Return Value: 00242 00243 None. 00244 00245 --*/ 00246 00247 { 00248 00249 HAL_PROFILE_SOURCE_INTERVAL ProfileSourceInterval; 00250 00251 if (Source == ProfileTime) { 00252 00253 // 00254 // If the specified sampling interval is less than the minimum 00255 // sampling interval, then set the sampling interval to the minimum 00256 // sampling interval. 00257 // 00258 00259 if (Interval < MINIMUM_PROFILE_INTERVAL) { 00260 Interval = MINIMUM_PROFILE_INTERVAL; 00261 } 00262 00263 // 00264 // Set the sampling interval. 00265 // 00266 00267 KiProfileInterval = (ULONG)KiIpiGenericCall(HalSetProfileInterval, Interval); 00268 00269 } else if (Source == ProfileAlignmentFixup) { 00270 KiProfileAlignmentFixupInterval = Interval; 00271 00272 } else { 00273 00274 // 00275 // The HAL is responsible for setting this profile interval. 00276 // 00277 00278 ProfileSourceInterval.Source = Source; 00279 ProfileSourceInterval.Interval = Interval; 00280 HalSetSystemInformation(HalProfileSourceInterval, 00281 sizeof(HAL_PROFILE_SOURCE_INTERVAL), 00282 &ProfileSourceInterval); 00283 } 00284 00285 return; 00286 }

BOOLEAN KeStartProfile IN PKPROFILE  Profile,
IN PULONG  Buffer
 

Definition at line 289 of file profobj.c.

References _KACTIVE_PROFILE_SOURCE::Affinity, ASSERT, ASSERT_PROFILE, Buffer, DISPATCH_LEVEL, ExAllocatePoolWithTag, ExFreePool(), FALSE, HalStartProfileInterrupt(), KeGetCurrentPrcb, KeLowerIrql(), KeNumberProcessors, KeRaiseIrql(), KiEnableAlignmentExceptions, KiIpiSendPacket(), KiIpiStallOnPacketTargets(), KiProfileAlignmentFixup, KiProfileIrql, KiProfileListHead, KiProfileLock, KiProfileSourceListHead, KiStartProfileInterrupt(), L, _KACTIVE_PROFILE_SOURCE::ListEntry, NonPagedPool, NULL, PKACTIVE_PROFILE_SOURCE, _KACTIVE_PROFILE_SOURCE::ProcessorCount, _KPROCESS::ProfileListHead, _KACTIVE_PROFILE_SOURCE::Source, and TRUE.

Referenced by NtStartProfile().

00296 : 00297 00298 This function starts profile data gathering on the specified profile 00299 object. The profile object is marked started, and is registered with 00300 the profile interrupt procedure. 00301 00302 If the number of active profile objects was previously zero, then the 00303 profile interrupt is enabled. 00304 00305 N.B. For the current implementation, an arbitrary number of profile 00306 objects may be active at once. This can present a large system 00307 overhead. It is assumed that the caller appropriately limits the 00308 the number of active profiles. 00309 00310 Arguments: 00311 00312 Profile - Supplies a pointer to a control object of type profile. 00313 00314 Buffer - Supplies a pointer to an array of counters, which record 00315 the number of hits in the corresponding bucket. 00316 00317 Return Value: 00318 00319 A value of TRUE is returned if profiling was previously stopped for 00320 the specified profile object. Otherwise, a value of FALSE is returned. 00321 00322 --*/ 00323 00324 { 00325 00326 KIRQL OldIrql, OldIrql2; 00327 PKPROCESS Process; 00328 BOOLEAN Started; 00329 KAFFINITY TargetProcessors; 00330 PKPRCB Prcb; 00331 PKACTIVE_PROFILE_SOURCE ActiveSource = NULL; 00332 PKACTIVE_PROFILE_SOURCE CurrentActiveSource; 00333 PKACTIVE_PROFILE_SOURCE AllocatedPool; 00334 PLIST_ENTRY ListEntry; 00335 ULONG SourceSize; 00336 KAFFINITY AffinitySet; 00337 PULONG Reference; 00338 00339 ASSERT_PROFILE(Profile); 00340 ASSERT(KeGetCurrentIrql() <= DISPATCH_LEVEL); 00341 00342 // 00343 // Allocate pool that may be required before raising to PROFILE_LEVEL. 00344 // 00345 00346 SourceSize = sizeof(KACTIVE_PROFILE_SOURCE) + sizeof(ULONG) * 00347 (KeNumberProcessors - 1); 00348 AllocatedPool = ExAllocatePoolWithTag(NonPagedPool, SourceSize, 'forP'); 00349 if (AllocatedPool == NULL) { 00350 return(TRUE); 00351 } 00352 00353 // 00354 // Raise to dispatch level 00355 // 00356 00357 KeRaiseIrql (DISPATCH_LEVEL, &OldIrql); 00358 Prcb = KeGetCurrentPrcb(); 00359 00360 // 00361 // Raise IRQL to PROFILE_LEVEL and acquire the profile lock. 00362 // 00363 00364 KeRaiseIrql(KiProfileIrql, &OldIrql2); 00365 KiAcquireSpinLock(&KiProfileLock); 00366 00367 // 00368 // Assume object already started 00369 // 00370 00371 Started = FALSE; 00372 AffinitySet = 0L; 00373 TargetProcessors = 0L; 00374 00375 // 00376 // If the specified profile object is not started, set started to TRUE, 00377 // set the address of the profile buffer, set the profile object to started, 00378 // insert the profile object in the appropriate profile list, and start 00379 // profile interrupts if the number of active profile objects was previously zero. 00380 // 00381 00382 if (Profile->Started == FALSE) { 00383 00384 Started = TRUE; 00385 Profile->Buffer = Buffer; 00386 Profile->Started = TRUE; 00387 Process = Profile->Process; 00388 if (Process != NULL) { 00389 InsertTailList(&Process->ProfileListHead, &Profile->ProfileListEntry); 00390 00391 } else { 00392 InsertTailList(&KiProfileListHead, &Profile->ProfileListEntry); 00393 } 00394 00395 // 00396 // Check the profile source list to see if this profile source is 00397 // already started. If so, update the reference counts. If not, 00398 // allocate a profile source object, initialize the reference 00399 // counts, and add it to the list. 00400 // 00401 00402 ListEntry = KiProfileSourceListHead.Flink; 00403 while (ListEntry != &KiProfileSourceListHead) { 00404 CurrentActiveSource = CONTAINING_RECORD(ListEntry, 00405 KACTIVE_PROFILE_SOURCE, 00406 ListEntry); 00407 00408 if (CurrentActiveSource->Source == Profile->Source) { 00409 ActiveSource = CurrentActiveSource; 00410 break; 00411 } 00412 ListEntry = ListEntry->Flink; 00413 } 00414 00415 if (ActiveSource == NULL) { 00416 00417 // 00418 // This source was not found, allocate and initialize a new entry and add 00419 // it to the head of the list. 00420 // 00421 00422 ActiveSource = AllocatedPool; 00423 AllocatedPool = NULL; 00424 RtlZeroMemory(ActiveSource, SourceSize); 00425 ActiveSource->Source = Profile->Source; 00426 InsertHeadList(&KiProfileSourceListHead, &ActiveSource->ListEntry); 00427 if (Profile->Source == ProfileAlignmentFixup) { 00428 KiProfileAlignmentFixup = TRUE; 00429 } 00430 } 00431 00432 // 00433 // Increment the reference counts for each processor in the 00434 // affinity set. 00435 // 00436 00437 AffinitySet = Profile->Affinity; 00438 Reference = &ActiveSource->ProcessorCount[0]; 00439 while (AffinitySet != 0) { 00440 if (AffinitySet & 1) { 00441 *Reference = *Reference + 1; 00442 } 00443 00444 AffinitySet = AffinitySet >> 1; 00445 Reference = Reference + 1; 00446 } 00447 00448 // 00449 // Compute the processors which the profile interrupt is 00450 // required and not already started 00451 // 00452 00453 AffinitySet = Profile->Affinity & ~ActiveSource->Affinity; 00454 TargetProcessors = AffinitySet & ~Prcb->SetMember; 00455 00456 // 00457 // Update set of processors on which this source is active. 00458 // 00459 00460 ActiveSource->Affinity |= Profile->Affinity; 00461 } 00462 00463 // 00464 // Release the profile lock, lower IRQL to its previous value, and 00465 // return whether profiling was started. 00466 // 00467 00468 KiReleaseSpinLock(&KiProfileLock); 00469 KeLowerIrql(OldIrql2); 00470 00471 // 00472 // Start profile interrupt on pending processors 00473 // 00474 00475 #if !defined(NT_UP) 00476 00477 if (TargetProcessors != 0) { 00478 KiIpiSendPacket(TargetProcessors, 00479 KiStartProfileInterrupt, 00480 (PVOID)Profile->Source, 00481 NULL, 00482 NULL); 00483 } 00484 00485 #endif 00486 00487 if (AffinitySet & Prcb->SetMember) { 00488 if (Profile->Source == ProfileAlignmentFixup) { 00489 KiEnableAlignmentExceptions(); 00490 } 00491 HalStartProfileInterrupt(Profile->Source); 00492 } 00493 00494 #if !defined(NT_UP) 00495 00496 if (TargetProcessors != 0) { 00497 KiIpiStallOnPacketTargets(TargetProcessors); 00498 } 00499 00500 #endif 00501 00502 // 00503 // Lower to original IRQL 00504 // 00505 00506 KeLowerIrql(OldIrql); 00507 00508 // 00509 // If the allocated pool was not used, free it now. 00510 // 00511 00512 if (AllocatedPool != NULL) { 00513 ExFreePool(AllocatedPool); 00514 } 00515 00516 return Started; 00517 }

BOOLEAN KeStopProfile IN PKPROFILE  Profile  ) 
 

Definition at line 520 of file profobj.c.

References _KACTIVE_PROFILE_SOURCE::Affinity, ASSERT, ASSERT_PROFILE, DISPATCH_LEVEL, ExFreePool(), FALSE, HalStopProfileInterrupt(), KeGetCurrentPrcb, KeLowerIrql(), KeRaiseIrql(), KiDisableAlignmentExceptions, KiIpiSendPacket(), KiIpiStallOnPacketTargets(), KiProfileAlignmentFixup, KiProfileIrql, KiProfileLock, KiProfileSourceListHead, KiStopProfileInterrupt(), L, _KACTIVE_PROFILE_SOURCE::ListEntry, NULL, PKACTIVE_PROFILE_SOURCE, _KACTIVE_PROFILE_SOURCE::ProcessorCount, _KACTIVE_PROFILE_SOURCE::Source, and TRUE.

Referenced by ExpProfileDelete(), and NtStopProfile().

00526 : 00527 00528 This function stops profile data gathering on the specified profile 00529 object. The object is marked stopped, and is removed from the active 00530 profile list. 00531 00532 If the number of active profile objects goes to zero, then the profile 00533 interrupt is disabled. 00534 00535 Arguments: 00536 00537 Profile - Supplies a pointer to a control object of type profile. 00538 00539 Return Value: 00540 00541 A value of TRUE is returned if profiling was previously started for 00542 the specified profile object. Otherwise, a value of FALSE is returned. 00543 00544 --*/ 00545 00546 { 00547 00548 KIRQL OldIrql, OldIrql2; 00549 BOOLEAN Stopped; 00550 KAFFINITY TargetProcessors; 00551 PKPRCB Prcb; 00552 BOOLEAN StopInterrupt = TRUE; 00553 PLIST_ENTRY ListEntry; 00554 PKACTIVE_PROFILE_SOURCE ActiveSource; 00555 PKACTIVE_PROFILE_SOURCE PoolToFree=NULL; 00556 KAFFINITY AffinitySet = 0; 00557 KAFFINITY CurrentProcessor; 00558 PULONG Reference; 00559 00560 ASSERT_PROFILE(Profile); 00561 ASSERT(KeGetCurrentIrql() <= DISPATCH_LEVEL); 00562 00563 // 00564 // Raise to disaptch level 00565 // 00566 00567 KeRaiseIrql (DISPATCH_LEVEL, &OldIrql); 00568 Prcb = KeGetCurrentPrcb(); 00569 00570 // 00571 // Raise IRQL to PROFILE_LEVEL and acquire the profile lock. 00572 // 00573 00574 KeRaiseIrql(KiProfileIrql, &OldIrql2); 00575 KiAcquireSpinLock(&KiProfileLock); 00576 00577 // 00578 // Assume object already stopped 00579 // 00580 00581 Stopped = FALSE; 00582 AffinitySet = 0L; 00583 TargetProcessors = 0L; 00584 00585 // 00586 // If the specified profile object is not stopped, set stopped to TRUE, set 00587 // the profile object to stopped, remove the profile object object from the 00588 // appropriate profilelist, and stop profile interrupts if the number of 00589 // active profile objects is zero. 00590 // 00591 00592 if (Profile->Started != FALSE) { 00593 00594 Stopped = TRUE; 00595 Profile->Started = FALSE; 00596 RemoveEntryList(&Profile->ProfileListEntry); 00597 00598 // 00599 // Search the profile source list to find the entry for this 00600 // profile source. 00601 // 00602 00603 ListEntry = KiProfileSourceListHead.Flink; 00604 do { 00605 ASSERT(ListEntry != &KiProfileSourceListHead); 00606 ActiveSource = CONTAINING_RECORD(ListEntry, 00607 KACTIVE_PROFILE_SOURCE, 00608 ListEntry); 00609 ListEntry = ListEntry->Flink; 00610 } while ( ActiveSource->Source != Profile->Source ); 00611 00612 // 00613 // Decrement the reference counts for each processor in the 00614 // affinity set and build up a mask of the processors that 00615 // now have a reference count of zero. 00616 // 00617 00618 CurrentProcessor = 1; 00619 TargetProcessors = 0; 00620 AffinitySet = Profile->Affinity; 00621 Reference = &ActiveSource->ProcessorCount[0]; 00622 while (AffinitySet != 0) { 00623 if (AffinitySet & 1) { 00624 *Reference = *Reference - 1; 00625 if (*Reference == 0) { 00626 TargetProcessors = TargetProcessors | CurrentProcessor; 00627 } 00628 } 00629 00630 AffinitySet = AffinitySet >> 1; 00631 Reference = Reference + 1; 00632 CurrentProcessor = CurrentProcessor << 1; 00633 } 00634 00635 // 00636 // Compute the processors whose profile interrupt reference 00637 // count has dropped to zero. 00638 // 00639 00640 AffinitySet = TargetProcessors; 00641 TargetProcessors = AffinitySet & ~Prcb->SetMember; 00642 00643 // 00644 // Update set of processors on which this source is active. 00645 // 00646 00647 ActiveSource->Affinity &= ~AffinitySet; 00648 00649 // 00650 // Determine whether this profile source is stopped on all 00651 // processors. If so, remove it from the list and free it. 00652 // 00653 00654 if (ActiveSource->Affinity == 0) { 00655 RemoveEntryList(&ActiveSource->ListEntry); 00656 PoolToFree = ActiveSource; 00657 if (Profile->Source == ProfileAlignmentFixup) { 00658 KiProfileAlignmentFixup = FALSE; 00659 } 00660 } 00661 } 00662 00663 // 00664 // Release the profile lock, lower IRQL to its previous value, and 00665 // return whether profiling was stopped. 00666 // 00667 00668 KiReleaseSpinLock(&KiProfileLock); 00669 KeLowerIrql(OldIrql2); 00670 00671 // 00672 // Stop profile interrupt on pending processors 00673 // 00674 00675 #if !defined(NT_UP) 00676 00677 if (TargetProcessors != 0) { 00678 KiIpiSendPacket(TargetProcessors, 00679 KiStopProfileInterrupt, 00680 (PVOID)Profile->Source, 00681 NULL, 00682 NULL); 00683 } 00684 00685 #endif 00686 00687 if (AffinitySet & Prcb->SetMember) { 00688 if (Profile->Source == ProfileAlignmentFixup) { 00689 KiDisableAlignmentExceptions(); 00690 } 00691 HalStopProfileInterrupt(Profile->Source); 00692 } 00693 00694 #if !defined(NT_UP) 00695 00696 if (TargetProcessors != 0) { 00697 KiIpiStallOnPacketTargets(TargetProcessors); 00698 } 00699 00700 #endif 00701 00702 // 00703 // Lower to original IRQL 00704 // 00705 00706 KeLowerIrql (OldIrql); 00707 00708 // 00709 // Now that IRQL has been lowered, free the profile source if 00710 // necessary. 00711 // 00712 00713 if (PoolToFree != NULL) { 00714 ExFreePool(PoolToFree); 00715 } 00716 00717 return Stopped; 00718 }

VOID KiStartProfileInterrupt IN PKIPI_CONTEXT  SignalDone,
IN PVOID  Parameter1,
IN PVOID  Parameter2,
IN PVOID  Parameter3
 

Definition at line 772 of file profobj.c.

References HalStartProfileInterrupt(), KiEnableAlignmentExceptions, and KiIpiSignalPacketDone().

Referenced by KeStartProfile().

00781 : 00782 00783 This is the target function for stopping the profile interrupt on target 00784 processors. 00785 00786 Arguments: 00787 00788 SignalDone - Supplies a pointer to a variable that is cleared when the 00789 requested operation has been performed 00790 00791 Parameter1 - Supplies the profile source 00792 00793 Parameter2 - Parameter3 - not used 00794 00795 Return Value: 00796 00797 None. 00798 00799 --*/ 00800 00801 { 00802 00803 KPROFILE_SOURCE ProfileSource; 00804 00805 // 00806 // Start the profile interrupt on the current processor and clear the 00807 // data cache packet address to signal the source to continue. 00808 // 00809 00810 ProfileSource = (KPROFILE_SOURCE)PtrToUlong(Parameter1); 00811 if (ProfileSource == ProfileAlignmentFixup) { 00812 KiEnableAlignmentExceptions(); 00813 } 00814 HalStartProfileInterrupt(ProfileSource); 00815 KiIpiSignalPacketDone(SignalDone); 00816 return; 00817 }

VOID KiStopProfileInterrupt IN PKIPI_CONTEXT  SignalDone,
IN PVOID  Parameter1,
IN PVOID  Parameter2,
IN PVOID  Parameter3
 

Definition at line 724 of file profobj.c.

References HalStopProfileInterrupt(), KiDisableAlignmentExceptions, and KiIpiSignalPacketDone().

Referenced by KeStopProfile().

00733 : 00734 00735 This is the target function for stopping the profile interrupt on target 00736 processors. 00737 00738 Arguments: 00739 00740 SignalDone - Supplies a pointer to a variable that is cleared when the 00741 requested operation has been performed 00742 00743 Parameter1 - Supplies the profile source 00744 00745 Parameter2 - Parameter3 - not used 00746 00747 Return Value: 00748 00749 None. 00750 00751 --*/ 00752 00753 { 00754 00755 KPROFILE_SOURCE ProfileSource; 00756 00757 // 00758 // Stop the profile interrupt on the current processor and clear the 00759 // data cache packet address to signal the source to continue. 00760 // 00761 00762 ProfileSource = (KPROFILE_SOURCE) PtrToUlong(Parameter1); 00763 if (ProfileSource == ProfileAlignmentFixup) { 00764 KiDisableAlignmentExceptions(); 00765 } 00766 HalStopProfileInterrupt(ProfileSource); 00767 KiIpiSignalPacketDone(SignalDone); 00768 return; 00769 }


Generated on Sat May 15 19:45:21 2004 for test by doxygen 1.3.7