| 635 | } |
| 636 | |
| 637 | void Profiler::enableMarker(const char *marker, bool enable) |
| 638 | { |
| 639 | reset(); |
| 640 | U32 markerLen = dStrlen(marker); |
| 641 | if(markerLen == 0) |
| 642 | return; |
| 643 | bool sn = marker[markerLen - 1] == '*'; |
| 644 | for(ProfilerRootData *data = ProfilerRootData::sRootList; data; data = data->mNextRoot) |
| 645 | { |
| 646 | if(sn) |
| 647 | { |
| 648 | if(!dStrncmp(marker, data->mName, markerLen - 1)) |
| 649 | data->mEnabled = enable; |
| 650 | } |
| 651 | else |
| 652 | { |
| 653 | if(!String::compare(marker, data->mName)) |
| 654 | data->mEnabled = enable; |
| 655 | } |
| 656 | } |
| 657 | } |
| 658 | |
| 659 | //============================================================================= |
| 660 | // Console Functions. |
no test coverage detected