mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
let profiler trace 'get member' calls, because I suspect they might be slow (linear string lookup)
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1244 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -104,6 +104,19 @@ Profiler::Profiler(Timer& timer, Variable function_name)
|
||||
timer.exclude_time();
|
||||
}
|
||||
|
||||
// Enter a function
|
||||
Profiler::Profiler(Timer& timer, const Char* function_name)
|
||||
: timer(timer)
|
||||
, parent(function) // push
|
||||
{
|
||||
FunctionProfileP& fpp = parent->children[(size_t)function_name];
|
||||
if (!fpp) {
|
||||
fpp = new_intrusive1<FunctionProfile>(function_name);
|
||||
}
|
||||
function = fpp.get();
|
||||
timer.exclude_time();
|
||||
}
|
||||
|
||||
// Enter a function
|
||||
Profiler::Profiler(Timer& timer, void* function_object, const String& function_name)
|
||||
: timer(timer)
|
||||
|
||||
Reference in New Issue
Block a user