diff --git a/src/bin/debug/profile/CallgrindProfileResult.cpp b/src/bin/debug/profile/CallgrindProfileResult.cpp index ce5e0f0e55..fb39a54e3d 100644 --- a/src/bin/debug/profile/CallgrindProfileResult.cpp +++ b/src/bin/debug/profile/CallgrindProfileResult.cpp @@ -302,9 +302,17 @@ CallgrindProfileResult::_PrintFunction(FILE* out, // need to print the image name int32 index = fNextImageOutputIndex++; image->SetOutputIndex(index); - fprintf(out, - "%sob=(%" B_PRId32 ") %s:%" B_PRId32 "\n", called ? "c" : "", - index, image->GetImage()->Name(), image->ID()); + const char* name = image->GetImage()->Name(); + if (name[0] == '/' || strcmp(name, "commpage") == 0) { + fprintf(out, + "%sob=(%" B_PRId32 ") %s\n", called ? "c" : "", + index, name); + } else { + // add ID to image name + fprintf(out, + "%sob=(%" B_PRId32 ") %s:%" B_PRId32 "\n", called ? "c" : "", + index, name, image->ID()); + } } else { // image is already known // TODO: We may not need to print it at all!