Add a command to dump profiling output.

This commit is contained in:
Ryan Stecker
2014-08-09 13:32:05 -05:00
parent 3edd1ce658
commit 0bde28cc17
4 changed files with 36 additions and 1 deletions
+9 -1
View File
@@ -73,6 +73,14 @@ VProfTool::Stop(void (*render)(const char *fmt, ...))
RenderHelp(render);
}
void
VProfTool::Dump()
{
g_VProfCurrentProfile.Pause();
g_VProfCurrentProfile.OutputReport(VPRT_FULL);
g_VProfCurrentProfile.Resume();
}
bool
VProfTool::IsActive()
{
@@ -105,5 +113,5 @@ VProfTool::LeaveScope()
void
VProfTool::RenderHelp(void (*render)(const char *fmt, ...))
{
render("Use vprof_generate_report in your console to analyze a profile session.");
render("Use 'sm prof dump vprof' or one of the vprof_generate_report commands in your console to analyze a profile session.");
}