[Lldb-commits] [PATCH] D52406: Make DIE_IS_BEING_PARSED local to the current thread.

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Sep 24 07:20:48 PDT 2018


JDevlieghere created this revision.
JDevlieghere added a reviewer: labath.
Herald added a subscriber: mgorny.
JDevlieghere edited the summary of this revision.

This is an attempt to realize Pavel's suggestion from https://reviews.llvm.org/D48393

In https://reviews.llvm.org/D48393#1139327, @labath wrote:

> It's even more complicated than that, in case you really have reference cycles, you can have multiple threads starting parsing from different points in that cycle, and getting deadlocked waiting for the DIE_IS_BEING_PARSED results from each other.
>
> The only sane algorithm I can come up right now is to make the list of parsed dies local to each thread/parsing entity (e.g. via a "visited" list), and only update the global map once the parsing has completed (successfully or not). This can potentially duplicate some effort where one thread parses a type only to find out that it has already been parsed, but hopefully that is not going to be the common case. The alternative is some complicated resource cycle detection scheme.



Repository:
  rLLDB LLDB

https://reviews.llvm.org/D52406

Files:
  source/Plugins/SymbolFile/DWARF/CMakeLists.txt
  source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
  source/Plugins/SymbolFile/DWARF/ThreadSafeDIEMap.cpp
  source/Plugins/SymbolFile/DWARF/ThreadSafeDIEMap.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52406.166645.patch
Type: text/x-patch
Size: 4560 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180924/32f16e20/attachment-0001.bin>


More information about the lldb-commits mailing list