[Lldb-commits] [PATCH] D68549: make ConstString allocate memory in non-tiny chunks

2019-10-06 Thread Luboš Luňák via Phabricator via lldb-commits
llunak updated this revision to Diff 223414.
llunak added a comment.

Increased default number of buckets for StringMap too.


Repository:
  rLLDB LLDB

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68549/new/

https://reviews.llvm.org/D68549

Files:
  lldb/source/Utility/ConstString.cpp


Index: lldb/source/Utility/ConstString.cpp
===
--- lldb/source/Utility/ConstString.cpp
+++ lldb/source/Utility/ConstString.cpp
@@ -31,7 +31,10 @@
 class Pool {
 public:
   typedef const char *StringPoolValueType;
-  typedef llvm::StringMap
+  // BumpPtrAllocator allocates in 4KiB chunks, any larger C++ project is going
+  // to have megabytes of symbols, so allocate in larger chunks.
+  typedef llvm::BumpPtrAllocatorImpl Allocator;
+  typedef llvm::StringMap
   StringPool;
   typedef llvm::StringMapEntry StringPoolEntryType;
 
@@ -152,7 +155,9 @@
 
   struct PoolEntry {
 mutable llvm::sys::SmartRWMutex m_mutex;
-StringPool m_string_map;
+// StringMap by default starts with 16 buckets, any larger project is
+// going to have many symbols, so start with a larger value.
+StringPool m_string_map = StringPool( 65536 );
   };
 
   std::array m_string_pools;


Index: lldb/source/Utility/ConstString.cpp
===
--- lldb/source/Utility/ConstString.cpp
+++ lldb/source/Utility/ConstString.cpp
@@ -31,7 +31,10 @@
 class Pool {
 public:
   typedef const char *StringPoolValueType;
-  typedef llvm::StringMap
+  // BumpPtrAllocator allocates in 4KiB chunks, any larger C++ project is going
+  // to have megabytes of symbols, so allocate in larger chunks.
+  typedef llvm::BumpPtrAllocatorImpl Allocator;
+  typedef llvm::StringMap
   StringPool;
   typedef llvm::StringMapEntry StringPoolEntryType;
 
@@ -152,7 +155,9 @@
 
   struct PoolEntry {
 mutable llvm::sys::SmartRWMutex m_mutex;
-StringPool m_string_map;
+// StringMap by default starts with 16 buckets, any larger project is
+// going to have many symbols, so start with a larger value.
+StringPool m_string_map = StringPool( 65536 );
   };
 
   std::array m_string_pools;
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D68289: [lldb-server/android] Show more processes by relaxing some checks

2019-10-06 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil added a comment.

It has regressed on Linux Fedora 30 x86_64:

  lldb-Suite :: commands/process/attach/TestProcessAttach.py
  lldb-Suite :: tools/lldb-vscode/attach/TestVSCode_attach.py

F10185566: 1 


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68289/new/

https://reviews.llvm.org/D68289



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D66791: [lldb][ELF] Read symbols from .gnu_debugdata sect.

2019-10-06 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil added a comment.

In D66791#1696340 , @kwk wrote:

>   lldb-Suite :: commands/process/attach/TestProcessAttach.py
>   lldb-Suite :: tools/lldb-vscode/attach/TestVSCode_attach.py
>   


These are by: D68289 

>   lldb-Suite :: python_api/hello_world/TestHelloWorld.py
>   lldb-Suite :: 
> tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py
>

The Fedora buildbot shows 

 different two ones:

  lldb-Suite :: commands/gui/basic/TestGuiBasic.py
  lldb-Suite :: python_api/hello_world/TestHelloWorld.py

Although I do not have those reproducible on my local Fedora 30 host.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66791/new/

https://reviews.llvm.org/D66791



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D68558: [Testsuite] Get rid of most of the recursive shared library Makefiles

2019-10-06 Thread Frederic Riss via Phabricator via lldb-commits
friss created this revision.
friss added reviewers: aprantl, labath.
Herald added a project: LLDB.

I was working on cleaning up our on-device test runs last week, and as
a result I needed to update a lot of test Makefiles in the Swift
tree. I found it especailly annoying to update the build system of
tests that are building mutliple images (typically a shared
library).

The main reason is that you can't see what's (if anything) special
about the build from the main makefile. You always need to open
mutliple Makefiles. Another reason is the way you have to add a
special line to your clean rule to do the right thing, and you never
really know which arguments to pass.

Most of the secondary Makefiles we have are just a couple variable
definitions and then an include of Makefile.rules. This patch removes
most of the secondary Makefiles and replaces them with a direct
invocation of Makefile.rules in the main Makefile. The specificities
of each sub-build are listed right there on the recursive $(MAKE)
call. All the variables that matter are being passed automagically by
make as they have been passed on the command line. The only things you
need to specify are the variables customizating the Makefile.rules
logic for each image.

This patch also deals with the clean rules using this trick to avoid
having to duplicate the recursive invocation in a separate clean rule:

mylib clean::

  $(MAKE) -f $(MAKEFILE_RULES) ... $(MAKECMDGOALS)

The MAKECMDGOALS variable at the end contains the list of build goals
that have been passed on the command line. When it's empty, this
invocation just calls the default Makefile.rules rule which is what
you want. When "clean" is passed as a goal, the rule will be invoked
too and it is passed through MAKECMDGOALS invoking the appropriate
cleaning logic from Makefile.rules.

I really like the conciseness of this approach and the fact that
everything is visible in one place. What do others think?


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D68558

Files:
  lldb/packages/Python/lldbsuite/test/commands/expression/top-level/Makefile
  lldb/packages/Python/lldbsuite/test/commands/expression/top-level/dummy.mk
  lldb/packages/Python/lldbsuite/test/commands/target/create-deps/Makefile
  lldb/packages/Python/lldbsuite/test/commands/target/create-deps/a.mk
  lldb/packages/Python/lldbsuite/test/functionalities/exec/Makefile
  lldb/packages/Python/lldbsuite/test/functionalities/exec/secondprog.mk
  lldb/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/Makefile
  lldb/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/simple.mk
  lldb/packages/Python/lldbsuite/test/functionalities/load_unload/Makefile
  lldb/packages/Python/lldbsuite/test/functionalities/load_unload/a.mk
  lldb/packages/Python/lldbsuite/test/functionalities/load_unload/b.mk
  lldb/packages/Python/lldbsuite/test/functionalities/load_unload/c.mk
  lldb/packages/Python/lldbsuite/test/functionalities/load_unload/d.mk
  lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/Makefile
  lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/Makefile
  lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/a.mk
  lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/b.mk
  lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Makefile
  
lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Test.mk
  
lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/TestExt.mk
  lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/Makefile
  
lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/create-empty-corefile.mk
  lldb/packages/Python/lldbsuite/test/macosx/macabi/Makefile
  lldb/packages/Python/lldbsuite/test/macosx/macabi/dylib.mk
  lldb/packages/Python/lldbsuite/test/make/Makefile.rules
  lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/Makefile
  
lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_a.mk
  
lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_b_quote.mk

Index: lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_b_quote.mk
===
--- lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_b_quote.mk
+++ /dev/null
@@ -1,7 +0,0 @@
-LIB_PREFIX := svr4lib
-
-DYLIB_NAME := $(LIB_PREFIX)_b\"
-DYLIB_CXX_SOURCES := $(LIB_PREFIX)_b_quote.cpp
-DYLIB_ONLY := YES
-
-include Makefile.rules
Index: lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_a.mk
===
--- lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_a.mk
+++ /dev/null
@@ -1,7 +0,0 @@
-LIB_PREFIX := svr4lib
-
-DYLIB_NAME := $(LIB_PREFIX)_a
-DYLIB_CXX_SOURCES := $(LIB_PREFIX)_a.cpp
-DYLIB_ONLY := YES
-
-include Makefile.r