Fill out API more.
This commit is contained in:
parent
ec61d4d188
commit
fac52a2897
@ -95,7 +95,7 @@ ProfileToolManager::OnRootConsoleCommand2(const char *cmdname, const ICommandArg
|
|||||||
}
|
}
|
||||||
g_pSourcePawn2->DisableProfiling();
|
g_pSourcePawn2->DisableProfiling();
|
||||||
g_pSourcePawn2->SetProfilingTool(nullptr);
|
g_pSourcePawn2->SetProfilingTool(nullptr);
|
||||||
active_->Stop();
|
active_->Stop(render_help);
|
||||||
active_->RenderHelp(render_help);
|
active_->RenderHelp(render_help);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -66,9 +66,10 @@ VProfTool::Start()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
VProfTool::Stop()
|
VProfTool::Stop(void (*render)(const char *fmt, ...))
|
||||||
{
|
{
|
||||||
g_VProfCurrentProfile.Stop();
|
g_VProfCurrentProfile.Stop();
|
||||||
|
RenderHelp(render);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
@ -77,6 +78,12 @@ VProfTool::IsActive()
|
|||||||
return g_VProfCurrentProfile.IsEnabled();
|
return g_VProfCurrentProfile.IsEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
VProfTool::IsAttached()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
intptr_t
|
intptr_t
|
||||||
VProfTool::RegisterCode(
|
VProfTool::RegisterCode(
|
||||||
uintptr_t addr,
|
uintptr_t addr,
|
||||||
|
@ -43,8 +43,9 @@ public:
|
|||||||
const char *Name() KE_OVERRIDE;
|
const char *Name() KE_OVERRIDE;
|
||||||
const char *Description() KE_OVERRIDE;
|
const char *Description() KE_OVERRIDE;
|
||||||
bool Start() KE_OVERRIDE;
|
bool Start() KE_OVERRIDE;
|
||||||
void Stop() KE_OVERRIDE;
|
void Stop(void (*render)(const char *fmt, ...)) KE_OVERRIDE;
|
||||||
bool IsActive() KE_OVERRIDE;
|
bool IsActive() KE_OVERRIDE;
|
||||||
|
bool IsAttached() KE_OVERRIDE;
|
||||||
intptr_t RegisterCode(
|
intptr_t RegisterCode(
|
||||||
uintptr_t addr,
|
uintptr_t addr,
|
||||||
size_t length,
|
size_t length,
|
||||||
|
@ -1040,16 +1040,25 @@ namespace SourcePawn
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Initiate a stop command.
|
* @brief Initiate a stop command.
|
||||||
|
*
|
||||||
|
* @param render Function to render any help messages.
|
||||||
*/
|
*/
|
||||||
virtual void Stop() = 0;
|
virtual void Stop(void (*render)(const char *fmt, ...)) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns whether or not a profiler is active.
|
* @brief Returns whether or not the profiler is currently profiling.
|
||||||
*
|
*
|
||||||
* @return True if active, false otherwise.
|
* @return True if active, false otherwise.
|
||||||
*/
|
*/
|
||||||
virtual bool IsActive() = 0;
|
virtual bool IsActive() = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Returns whether the profiler is attached.
|
||||||
|
*
|
||||||
|
* @return True if attached, false otherwise.
|
||||||
|
*/
|
||||||
|
virtual bool IsAttached() = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Registers JIT code with the profiler.
|
* @brief Registers JIT code with the profiler.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user