[Lldb-commits] [PATCH] D83359: [Function] Lock the function when parsing call site info
Adrian Prantl via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Jul 8 15:38:27 PDT 2020
aprantl accepted this revision.
aprantl added a comment.
This revision is now accepted and ready to land.
Looks plausible.
================
Comment at: lldb/include/lldb/Symbol/Function.h:661
+ std::mutex
+ m_call_edges_lock; ///< Exclusive lock that controls read/write
+ /// access to m_call_edges and m_call_edges_resolved.
----------------
nit: When inline comments span multiple lines it's IMO less confusing to convert them to up-front comments.
```
/// Exclusive lock that controls read/write
/// access to m_call_edges and m_call_edges_resolved.
std::mutex m_call_edges_lock;
```
I also doubt that the ones in this file are formatted correctly, I think the continuation needs to also use `///<`.
================
Comment at: lldb/source/Symbol/Function.cpp:293
llvm::ArrayRef<std::unique_ptr<CallEdge>> Function::GetCallEdges() {
+ std::lock_guard<std::mutex> guard(m_call_edges_lock);
+
----------------
Can this be called on the same thread and would we benefit from a recursive_mutex?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83359/new/
https://reviews.llvm.org/D83359
More information about the lldb-commits
mailing list