mirror of
https://github.com/reactos/reactos.git
synced 2025-06-10 04:14:53 +00:00
[PSAPI]
Stub support for profiling svn path=/trunk/; revision=60797
This commit is contained in:
parent
6cbda0abe5
commit
c01603fd51
1 changed files with 59 additions and 16 deletions
|
@ -19,22 +19,6 @@
|
||||||
#define MAX_MODULES 0x2710 // Matches 10.000 modules
|
#define MAX_MODULES 0x2710 // Matches 10.000 modules
|
||||||
#define INIT_MEMORY_SIZE 0x1000 // Matches 4kB
|
#define INIT_MEMORY_SIZE 0x1000 // Matches 4kB
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
WINAPI
|
|
||||||
DllMain(HINSTANCE hDllHandle,
|
|
||||||
DWORD nReason,
|
|
||||||
LPVOID Reserved)
|
|
||||||
{
|
|
||||||
switch(nReason)
|
|
||||||
{
|
|
||||||
case DLL_PROCESS_ATTACH:
|
|
||||||
DisableThreadLibraryCalls(hDllHandle);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* INTERNAL *******************************************************************/
|
/* INTERNAL *******************************************************************/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -262,8 +246,67 @@ CallBackConvertToAscii(LPVOID pContext,
|
||||||
return Ret;
|
return Ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @unimplemented
|
||||||
|
*/
|
||||||
|
static void NTAPI
|
||||||
|
PsParseCommandLine(void)
|
||||||
|
{
|
||||||
|
UNIMPLEMENTED;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @unimplemented
|
||||||
|
*/
|
||||||
|
static void NTAPI
|
||||||
|
PsInitializeAndStartProfile(void)
|
||||||
|
{
|
||||||
|
UNIMPLEMENTED;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @unimplemented
|
||||||
|
*/
|
||||||
|
static void NTAPI
|
||||||
|
PsStopAndAnalyzeProfile(void)
|
||||||
|
{
|
||||||
|
UNIMPLEMENTED;
|
||||||
|
}
|
||||||
|
|
||||||
/* PUBLIC *********************************************************************/
|
/* PUBLIC *********************************************************************/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*/
|
||||||
|
BOOLEAN
|
||||||
|
WINAPI
|
||||||
|
DllMain(HINSTANCE hDllHandle,
|
||||||
|
DWORD nReason,
|
||||||
|
LPVOID Reserved)
|
||||||
|
{
|
||||||
|
switch(nReason)
|
||||||
|
{
|
||||||
|
case DLL_PROCESS_ATTACH:
|
||||||
|
DisableThreadLibraryCalls(hDllHandle);
|
||||||
|
if (NtCurrentPeb()->ProcessParameters->Flags & RTL_USER_PROCESS_PARAMETERS_PROFILE_USER)
|
||||||
|
{
|
||||||
|
PsParseCommandLine();
|
||||||
|
PsInitializeAndStartProfile();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case DLL_PROCESS_DETACH:
|
||||||
|
if (NtCurrentPeb()->ProcessParameters->Flags & RTL_USER_PROCESS_PARAMETERS_PROFILE_USER)
|
||||||
|
{
|
||||||
|
PsStopAndAnalyzeProfile();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue