Skip to content

Commit

Permalink
#2302: Add check for empty event map
Browse files Browse the repository at this point in the history
  • Loading branch information
pierrepebay committed Aug 15, 2024
1 parent 8dbd72a commit 1a3f586
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/vt/context/runnable_context/perf_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,9 @@ struct PerfData
PerfData()
{
std::unordered_map<std::string, std::pair<uint64_t,uint64_t>> global_map = vt::thePerfEventMap()->getEventMap();
// std::unordered_map<std::string, std::pair<uint64_t,uint64_t>> global_map = {
// {"instructions", std::make_pair(PERF_TYPE_HARDWARE, PERF_COUNT_HW_INSTRUCTIONS)}
// };
if (global_map.empty())
{
// vtAbort("the PerfEventMap event map is empty; initialize vt::thePerfEventMap->getEventMap(...)");
fmt::print("the PerfEventMap event map is empty; initialize vt::thePerfEventMap->getEventMap(...)\n");
vtAbort("the PerfEventMap event map is empty; initialize vt::thePerfEventMap->getEventMap(...)");
} else {
const char* env_p = getenv("VT_EVENTS");

Expand Down

0 comments on commit 1a3f586

Please sign in to comment.