diff options
author | Greg Clayton <gclayton@fb.com> | 2022-11-23 20:28:03 -0800 |
---|---|---|
committer | Greg Clayton <gclayton@fb.com> | 2022-11-30 21:22:27 -0800 |
commit | fc743f034a34d3fa0a6e4de3b34216e5ac5e4c93 (patch) | |
tree | 02b89037563b157227d16791e372070001127312 /lldb/packages/Python/lldbsuite/test/lldbtest.py | |
parent | da5903eb69c1f4ce850d039c85930f9425155a5e (diff) | |
download | llvm-fc743f034a34d3fa0a6e4de3b34216e5ac5e4c93.zip llvm-fc743f034a34d3fa0a6e4de3b34216e5ac5e4c93.tar.gz llvm-fc743f034a34d3fa0a6e4de3b34216e5ac5e4c93.tar.bz2 |
Report which modules have forcefully completed types in statistics.
A previous patch added the ability for us to tell if types were forcefully completed. This patch adds the ability to see which modules have forcefully completed types and aggregates the number of modules with forcefully completed types at the root level.
We add a module specific setting named "debugInfoHadIncompleteTypes" that is a boolean value. We also aggregate the number of modules at the root level that had incomplete debug info with a key named "totalModuleCountWithIncompleteTypes" that is a count of number of modules that had incomplete types.
Differential Revision: https://reviews.llvm.org/D138638
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lldbtest.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/lldbtest.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py index 63bad9d..d0501ef 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbtest.py +++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py @@ -37,6 +37,7 @@ from functools import wraps import gc import glob import io +import json import os.path import re import shutil @@ -1642,6 +1643,19 @@ class Base(unittest2.TestCase): err = platform.Run(shell_command) return (err, shell_command.GetStatus(), shell_command.GetOutput()) + def get_stats(self, options=None): + """ + Get the output of the "statistics dump" with optional extra options + and return the JSON as a python dictionary. + """ + return_obj = lldb.SBCommandReturnObject() + command = "statistics dump " + if options is not None: + command += options + self.ci.HandleCommand(command, return_obj, False) + metrics_json = return_obj.GetOutput() + return json.loads(metrics_json) + # Metaclass for TestBase to change the list of test metods when a new TestCase is loaded. # We change the test methods to create a new test method for each test for each debug info we are # testing. The name of the new test method will be '<original-name>_<debug-info>' and with adding @@ -2483,7 +2497,7 @@ FileCheck output: error = obj.GetError() self.fail(self._formatMessage(msg, "'{}' is not success".format(error))) - + """Assert two states are equal""" def assertState(self, first, second, msg=None): if first != second: |