llvm-project/lldb/test
Pavel Labath 65a16e56b9 [DataFormatters] Make libc++ list loop detection linear
Summary:
Loop detection code is being called before every element access. Although it tries to cache some
of the data by remembering the loop-free initial segment, every time it needs to increase this
segment, it will start from scratch. For the typical usage pattern, where one accesses the
elements in order, the loop detection will need to be run after every access, resulting in
quadratic behavior. This behavior is noticable even for the default 255 element limit.

In this commit, I rewrite the algorithm to be truly incremental -- it maintains the state of its
loop-detection runners between calls, and reuses them when it needs to check another segment.
This way, each part of the list is scanned only once, resulting in linear behavior.

Also note that I have changed the operator== of ListEntry to do the comparison based on the
value() function (instead of relying on ValueObjectSP equality). In my experiments, I kept
getting different ValueObjectSPs when going through the same element twice.

Reviewers: granata.enrico

Subscribers: lldb-commits, sivachandra

Differential Revision: http://reviews.llvm.org/D13902

llvm-svn: 250890
2015-10-21 10:17:21 +00:00
..
android/platform Increase default memory cache line size for android 2015-10-20 10:33:17 +00:00
api Reduce load on TestMultipleDebuggers. 2015-10-06 15:33:51 +00:00
arm_emulation Merge dwarf and dsym tests 2015-09-30 10:12:40 +00:00
attic
benchmarks Merge dwarf and dsym tests 2015-09-30 10:12:40 +00:00
driver/batch_mode Mark TestBatchMode as flaky on linux 2015-10-14 08:57:55 +00:00
example
expression_command Convert expectedFlakeyDarwin to expectedFlakeyDsym for TestCallUserDefinedFunction.py 2015-10-06 15:57:55 +00:00
functionalities [DataFormatters] Make libc++ list loop detection linear 2015-10-21 10:17:21 +00:00
help Merge dwarf and dsym tests 2015-09-30 10:12:40 +00:00
lang Fix test for change in a summary string (objects -> elements). 2015-10-12 19:00:28 +00:00
linux Re-disable TestBuiltinTrap on Windows. 2015-10-02 22:47:37 +00:00
logging Merge dwarf and dsym tests 2015-09-30 10:12:40 +00:00
macosx In r240466, when Greg added the jThreadsInfo packet, he accidentally 2015-10-15 04:20:42 +00:00
make [DWARFASTParserClang] Strengthen incomplete type handling. 2015-10-07 22:11:52 +00:00
pexpect-2.4 Eliminate kernel warning when running tests on FreeBSD 2014-02-18 21:33:10 +00:00
plugins Run tests with dwo symbol files 2015-10-07 10:02:17 +00:00
python_api Skip hanging watchpoint test on Windows (rather than just xfailing). 2015-10-16 23:19:22 +00:00
settings Fix regression caused by r249769 2015-10-09 11:01:56 +00:00
source-manager Merge dwarf and dsym tests 2015-09-30 10:12:40 +00:00
terminal Merge dwarf and dsym tests 2015-09-30 10:12:40 +00:00
test_runner Fix race on subprocess.Popen return values. 2015-10-02 20:51:11 +00:00
tools lldb-server: add support for binary memory reads 2015-10-14 12:59:37 +00:00
types Merge dwarf and dsym tests 2015-09-30 10:12:40 +00:00
unittest2 Factor the execution of the test method into a separate function to ensure that any exceptions that are thrown go out of scope and no longer hold references to SB objects that need to be freed before teardown. 2015-10-15 22:39:55 +00:00
warnings/uuid Merge dwarf and dsym tests 2015-09-30 10:12:40 +00:00
.categories
CMakeLists.txt Roll dosep.py parallel test runner into dotest.py command line 2015-09-03 18:58:44 +00:00
Makefile Roll dosep.py parallel test runner into dotest.py command line 2015-09-03 18:58:44 +00:00
README-TestSuite Comment discouraging writing command based test cases. 2015-03-18 23:16:58 +00:00
argparse_compat.py Include a small argparse compatibility layer for Python < 2.7 2013-02-16 09:05:23 +00:00
bench-history
bench.py Convert print statements to print function calls. 2015-10-19 23:45:41 +00:00
blacklist.py
crashinfo.c Alignment fix 2014-01-08 03:14:18 +00:00
curses_results.py Convert print statements to print function calls. 2015-10-19 23:45:41 +00:00
dosep.py Convert print statements to print function calls. 2015-10-19 23:45:41 +00:00
dotest.py Use six to portably assign metaclasses in Python 2 and 3. 2015-10-20 21:06:05 +00:00
dotest_args.py Convert print statements to print function calls. 2015-10-19 23:45:41 +00:00
dotest_channels.py test runner: remove print from prior commit; fixup listner socket backlog 2015-09-22 22:47:34 +00:00
lldb_pylint_helper.py Convert print statements to print function calls. 2015-10-19 23:45:41 +00:00
lldb_shared.py Introduce a mechanism for reusing Python modules out of tree. 2015-10-20 21:05:57 +00:00
lldbbench.py
lldbcurses.py Split getting the key from a window from the code that handles the key. 2015-10-16 23:34:40 +00:00
lldbinline.py Convert print statements to print function calls. 2015-10-19 23:45:41 +00:00
lldbpexpect.py Refactored lldb executable name discovery 2015-05-18 19:39:03 +00:00
lldbplatformutil.py Make several test case arm32 compatible 2015-04-17 09:37:06 +00:00
lldbtest.py Use six to portably assign metaclasses in Python 2 and 3. 2015-10-20 21:06:05 +00:00
lldbtest_config.py Refactored lldb executable name discovery 2015-05-18 19:39:03 +00:00
lldbutil.py Convert print statements to print function calls. 2015-10-19 23:45:41 +00:00
lock.py dotest.py - debug feature that helps find dosep races 2015-05-21 19:09:29 +00:00
progress.py Convert print statements to print function calls. 2015-10-19 23:45:41 +00:00
redo.py Convert print statements to print function calls. 2015-10-19 23:45:41 +00:00
test_results.py Cleaned up results formatter options hand-off. 2015-09-23 15:21:28 +00:00