Skip to content

Commit

Permalink
code optimization to reduce unnecessary print.
Browse files Browse the repository at this point in the history
  • Loading branch information
hariharan-devarajan committed Oct 9, 2023
1 parent 2101a31 commit 220d5ce
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/dlio_profiler/utils/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ inline std::pair<bool, std::string> is_traced_common(const char* filename, const
DLIO_PROFILER_LOGINFO("Profiler ignoring file %s for func %s", resolved_path, func);
return std::pair<bool, std::string>(false, filename);
}
for (const auto file : ignore_filename) {
if (strstr(resolved_path, file.c_str()) != NULL) {
DLIO_PROFILER_LOGINFO("Profiler Intercepted POSIX not file %s for func %s", resolved_path, func);
ignore = true;
break;
if (!ignore) {
for (const auto file : ignore_filename) {
if (strstr(resolved_path, file.c_str()) != NULL) {
ignore = true;
break;
}
}
}
if (!ignore) {
for (const auto file : track_filename) {
if (strstr(resolved_path, file.c_str()) != NULL) {
DLIO_PROFILER_LOGINFO("Profiler Intercepted POSIX tracing file %s for func %s", resolved_path, func);
found = true;
break;
}
Expand Down

0 comments on commit 220d5ce

Please sign in to comment.