From 23452e91c86a5cd1ca058ae83fc32f3b9c07506e Mon Sep 17 00:00:00 2001 From: Milian Wolff Date: Thu, 15 May 2014 22:47:48 +0200 Subject: [PATCH] Don't create single-entry trees output. --- malloctrace.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/malloctrace.cpp b/malloctrace.cpp index 04bc65a..8766f6a 100644 --- a/malloctrace.cpp +++ b/malloctrace.cpp @@ -192,6 +192,10 @@ unsigned int print_caller() } } + if (tree.depth == 1) { + return tree.data[0]; + } + auto& treeCache = threadData.treeCache; auto it = treeCache.find(tree); if (it == treeCache.end()) { -- 2.7.4