Re: [Lldb-commits] [PATCH] D13940: Fix race conditions in Core/Timer

2015-10-23 Thread Tamas Berghammer via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL251105: Fix race conditions in Core/Timer (authored by tberghammer). Changed prior to commit: http://reviews.llvm.org/D13940?vs=38118&id=38225#toc Repository: rL LLVM http://reviews.llvm.org/D13940

Re: [Lldb-commits] [PATCH] D13940: Fix race conditions in Core/Timer

2015-10-22 Thread Greg Clayton via lldb-commits
clayborg accepted this revision. clayborg added a comment. This revision is now accepted and ready to land. Looks good. http://reviews.llvm.org/D13940 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

Re: [Lldb-commits] [PATCH] D13940: Fix race conditions in Core/Timer

2015-10-22 Thread Tamas Berghammer via lldb-commits
tberghammer updated this revision to Diff 38118. tberghammer added a comment. We already used some thread local storage in the same file to store the current Timer stack so I decided to move the depth to the same storage object (it is using the Host::ThreadLocalStorage* methods). Originally I d

Re: [Lldb-commits] [PATCH] D13940: Fix race conditions in Core/Timer

2015-10-21 Thread Zachary Turner via lldb-commits
zturner added a comment. Sad as it may seem, I actually think we may *need* this `LLDB_THREAD_LOCAL` at some point in the future. The reason is that there is at least one place in LLDB (I think it might even be in `Timer`, but it's been a while since I found this) that relies on thread local d

Re: [Lldb-commits] [PATCH] D13940: Fix race conditions in Core/Timer

2015-10-21 Thread Greg Clayton via lldb-commits
clayborg added a comment. Yes, please use any llvm system utilities when possible. And scratch the need for LLDB_THREAD_LOCAL at any point in the future and just use llvm::ThreadLocal all the time as thread local variables have already been abstracted by llvm. http://reviews.llvm.org/D13940

Re: [Lldb-commits] [PATCH] D13940: Fix race conditions in Core/Timer

2015-10-21 Thread Zachary Turner via lldb-commits
zturner added a subscriber: zturner. Comment at: include/lldb/Core/Timer.h:89 @@ +88,3 @@ + +static thread_local unsigned g_depth; + clayborg wrote: > Not sure if all platforms support thread_local correctly. MacOSX might not. I > also spoke with some compile

Re: [Lldb-commits] [PATCH] D13940: Fix race conditions in Core/Timer

2015-10-21 Thread Greg Clayton via lldb-commits
clayborg requested changes to this revision. clayborg added a comment. This revision now requires changes to proceed. "thread_local" isn't well supported and has performance issues. See inlined comments. Comment at: include/lldb/Core/Timer.h:89 @@ +88,3 @@ + +static thread_

Re: [Lldb-commits] [PATCH] D13940: Fix race conditions in Core/Timer

2015-10-21 Thread Pavel Labath via lldb-commits
labath accepted this revision. labath added a comment. This revision is now accepted and ready to land. lgtm http://reviews.llvm.org/D13940 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb

[Lldb-commits] [PATCH] D13940: Fix race conditions in Core/Timer

2015-10-21 Thread Tamas Berghammer via lldb-commits
tberghammer created this revision. tberghammer added reviewers: labath, clayborg. tberghammer added a subscriber: lldb-commits. Fix race conditions in Core/Timer The Timer class already had some support for multi-threaded access but it still contained several race conditions. This CL fixes them i