summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Balykov <g.balykov@samsung.com>2023-05-23 18:23:15 +0300
committerGleb Balykov/Advanced System SW Lab /SRR/Staff Engineer/Samsung Electronics <g.balykov@samsung.com>2023-05-30 13:40:22 +0300
commitf5dbdb98a37d2fb7fe0a5ffc177958dea6233dfe (patch)
treeee741274ea689919d6a3fb330531f572cd529160
parent6010955ca42a65f5f1fd86201cc5c5a2dcd6af28 (diff)
downloadheaptrack-f5dbdb98a37d2fb7fe0a5ffc177958dea6233dfe.tar.gz
heaptrack-f5dbdb98a37d2fb7fe0a5ffc177958dea6233dfe.tar.bz2
heaptrack-f5dbdb98a37d2fb7fe0a5ffc177958dea6233dfe.zip
Disable frequent warning log from interpret when objects are not found
Some objects are not tracked with enabled sampling
-rw-r--r--src/interpret/heaptrack_interpret.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/interpret/heaptrack_interpret.cpp b/src/interpret/heaptrack_interpret.cpp
index dc486f4..ca40592 100644
--- a/src/interpret/heaptrack_interpret.cpp
+++ b/src/interpret/heaptrack_interpret.cpp
@@ -604,6 +604,9 @@ int main(int /*argc*/, char** /*argv*/)
uint64_t leakedManagedAllocations = 0;
uint64_t temporaryAllocations = 0;
+ bool hasUnknownObjects = false;
+ bool hasUnknownClasses = false;
+
while (reader.getLine(inqueue)) {
if (reader.mode() == 'x') {
reader >> exe;
@@ -865,12 +868,12 @@ int main(int /*argc*/, char** /*argv*/)
// instead of the next case. We should figure out how to add them to the trace earlier on.
const auto classId = data.addClass(classPointer);
if (classId == 0 && classPointer != 0) {
- cerr << "[W] Unknown class id (" << classPointer << ") here: " << reader.line() << endl;
+ hasUnknownClasses = true;
}
const auto objectId = ptrToIndex.peekPointer(objectPointer);
if (!objectId.second)
- cerr << "[W] unknown object id (" << objectPointer << ") here: " << reader.line() << endl;
+ hasUnknownObjects = true;
// trace point, map current output index to parent index
fprintf(outStream, "e %zx %zx %zx %zx %zx\n", gcCounter, numChildren, objectPointer, classId, objectId.first.index);
} else if (reader.mode() == 'C') {
@@ -886,6 +889,13 @@ int main(int /*argc*/, char** /*argv*/)
}
}
+ if (hasUnknownClasses) {
+ cerr << "[W] unknown class id was found (this might be fine in case of enabled sampling profiling)" << endl;
+ }
+ if (hasUnknownObjects) {
+ cerr << "[W] unknown object id was found (this might be fine in case of enabled sampling profiling)" << endl;
+ }
+
queueWriterThread.join();
fprintf(stderr, "heaptrack stats:\n"