#ifndef _NTEXAPI_H
#if (PHNT_MODE != PHNT_MODE_KERNEL)
/**
* The NtCreateProfile routine creates a profile object for performance monitoring.
*
* \param ProfileHandle A pointer to a variable that receives the handle to the profile object.
* \param Process Optional handle to the process to be profiled. If NULL, the current process is used.
* \param ProfileBase The base address of the region to be profiled.
* \param ProfileSize The size, in bytes, of the region to be profiled.
* \param BucketSize The size, in bytes, of each bucket in the profile buffer.
* \param Buffer A pointer to a buffer that receives the profile data.
* \param BufferSize The size, in bytes, of the buffer.
* \param ProfileSource The source of the profiling data (KPROFILE_SOURCE).
* \param Affinity The processor affinity mask indicating which processors to profile.
* \return NTSTATUS Successful or errant status.
*/
NTSYSCALLAPI
NTSTATUS
NTAPI
NtCreateProfile(
_Out_ PHANDLE ProfileHandle,
_In_opt_ HANDLE Process,
_In_ PVOID ProfileBase,
_In_ SIZE_T ProfileSize,
_In_ ULONG BucketSize,
_In_reads_bytes_(BufferSize) PULONG Buffer,
_In_ ULONG BufferSize,
_In_ KPROFILE_SOURCE ProfileSource,
_In_ KAFFINITY Affinity
);
View code on GitHub
#ifndef _NTZWAPI_H
NTSYSCALLAPI
NTSTATUS
NTAPI
ZwCreateProfile(
_Out_ PHANDLE ProfileHandle,
_In_opt_ HANDLE Process,
_In_ PVOID ProfileBase,
_In_ SIZE_T ProfileSize,
_In_ ULONG BucketSize,
_In_reads_bytes_(BufferSize) PULONG Buffer,
_In_ ULONG BufferSize,
_In_ KPROFILE_SOURCE ProfileSource,
_In_ KAFFINITY Affinity
);
View code on GitHub
No description available.
Function NtCreateProfile
creates Profile Object.
Profile Objects are used for application profiling. There're 24 profile counters defined in KPROFILE_SOURCE
enumeration type. Single Profile Object can be used to get information from one performance counter.
Result of call - HANDLE
to Profile Object.
HANDLE
to Process Object to profile. Not required if profiled code is placed in Kernel address space (above 0x80000000).
Start address of profiling.
Size of profiled memory block.
??? (cannot be less than 2).
Caller's allocated buffer for data.
Size of buffer, in bytes.
Identifier of performance counter. See KPROFILE_SOURCE
enumeration type for possible values.
Processor affinity mask. It defines processors to ask about performance counter.
Privilege for UserMode: SE_PROF_SINGLE_PROCESS_PRIVILEGE
Privilege for KernelMode: SE_SYSTEM_PROFILE_PRIVILEGE