Chromium Code Reviews| Index: src/IceCfg.cpp |
| diff --git a/src/IceCfg.cpp b/src/IceCfg.cpp |
| index 4f316c1280e7f1007c6bbaf2520f1df292e37285..4d3fc2ed078296658528a91a1073368612004244 100644 |
| --- a/src/IceCfg.cpp |
| +++ b/src/IceCfg.cpp |
| @@ -204,7 +204,6 @@ void Cfg::translate() { |
| if (TimingFocusOn == "*" || TimingFocusOn == Name) { |
| setFocusedTiming(); |
| getContext()->resetTimer(GlobalContext::TSK_Default); |
| - getContext()->setTimerName(GlobalContext::TSK_Default, Name); |
| } |
| } |
| } |
| @@ -240,8 +239,16 @@ void Cfg::translate() { |
| dump("Final output"); |
| if (getFocusedTiming()) { |
| - getContext()->mergeTimersFromTLS(); |
| - getContext()->dumpTimers(); |
| + // Temporarily override the thread-local timer name to be the name of the |
| + // function. Don't do it permanently because the final timer merge at the |
| + // end expects the thread-local timer names to be the same as the global |
| + // timer name. |
| + std::string OrigName = |
|
John
2016/04/06 13:05:32
Auto, maybe?
Jim Stichnoth
2016/04/06 13:23:58
Done.
|
| + getContext()->getTimerName(GlobalContext::TSK_Default); |
| + getContext()->setTimerName(GlobalContext::TSK_Default, |
| + getFunctionName().toString()); |
| + getContext()->dumpLocalTimers(); |
|
John
2016/04/06 13:05:32
Maybe have dumpLocalTimers do the renaming?
Jim Stichnoth
2016/04/06 13:23:58
Very nice! Done.
|
| + getContext()->setTimerName(GlobalContext::TSK_Default, OrigName); |
| } |
| } |