Add auto source map deduce count statistics

This patch adds auto source map deduce count as a target level statistics.
This will help telemetry to track how many debug sessions benefit from this feature.

Differential Revision: https://reviews.llvm.org/D134483
This commit is contained in:
Jeffrey Tan
2022-09-22 14:32:35 -07:00
parent bd81524e7f
commit c5073ed5f9
6 changed files with 31 additions and 5 deletions

View File

@@ -261,8 +261,10 @@ void BreakpointResolverFileLine::DeduceSourceMapping(
if (!new_mapping_from.empty() && !new_mapping_to.empty()) {
LLDB_LOG(log, "generating auto source map from {0} to {1}",
new_mapping_from, new_mapping_to);
target.GetSourcePathMap().AppendUnique(new_mapping_from, new_mapping_to,
/*notify*/ true);
if (target.GetSourcePathMap().AppendUnique(new_mapping_from,
new_mapping_to,
/*notify*/ true))
target.GetStatistics().IncreaseSourceMapDeduceCount();
}
}
}