[Lldb-commits] [PATCH] D29895: Refactor log channel registration mechanism

2017-02-15 Thread Pavel Labath via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL295190: Refactor log channel registration mechanism (authored by labath). Changed prior to commit: https://reviews.llvm.org/D29895?vs=88395&id=88545#toc Repository: rL LLVM https://reviews.llvm.org/

[Lldb-commits] [PATCH] D29895: Refactor log channel registration mechanism

2017-02-14 Thread Pavel Labath via Phabricator via lldb-commits
labath updated this revision to Diff 88395. labath marked an inline comment as done. labath added a comment. Encapsulate the atomic stuff into the Log::Channel class. Add a couple of comments. Let me know what you think. https://reviews.llvm.org/D29895 Files: include/lldb/Core/Log.h inclu

[Lldb-commits] [PATCH] D29895: Refactor log channel registration mechanism

2017-02-14 Thread Pavel Labath via Phabricator via lldb-commits
labath updated this revision to Diff 88381. labath added a comment. New version of the patch. I can still see a bit of room for improvement, but I am not sure if I'll manage to do it today, so this should at least enable us to do another round-trip. https://reviews.llvm.org/D29895 Files: inc

[Lldb-commits] [PATCH] D29895: Refactor log channel registration mechanism

2017-02-14 Thread Pavel Labath via Phabricator via lldb-commits
labath marked an inline comment as done. labath added a comment. Comment at: source/Core/Log.cpp:72 +if (llvm::StringRef("all").equals_lower(categories[i])) { + flags |= ~0; + continue; zturner wrote: > This is a little clearer if you just say `f

[Lldb-commits] [PATCH] D29895: Refactor log channel registration mechanism

2017-02-13 Thread Zachary Turner via Phabricator via lldb-commits
zturner added inline comments. Comment at: include/lldb/Core/Log.h:74 + llvm::ArrayRef categories, + uint32_t default_flags, std::atomic &log_ptr); + static void Unregister(llvm::StringRef name); Not sure I like the id

[Lldb-commits] [PATCH] D29895: Refactor log channel registration mechanism

2017-02-13 Thread Greg Clayton via Phabricator via lldb-commits
clayborg accepted this revision. clayborg added a comment. This revision is now accepted and ready to land. Looks good! https://reviews.llvm.org/D29895 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

[Lldb-commits] [PATCH] D29895: Refactor log channel registration mechanism

2017-02-13 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. I actually did add tests for that. :) I didn't try to be super-exhaustive, but I think they provide reasonable coverage. I'd be happy to add more, if you notice parts that are missing it. https://reviews.llvm.org/D29895 __

Re: [Lldb-commits] [PATCH] D29895: Refactor log channel registration mechanism

2017-02-13 Thread Zachary Turner via lldb-commits
Is it possible to add some unittests for this? In addition to just tests=good, it would also serve as documentation for the new api On Mon, Feb 13, 2017 at 9:09 AM Pavel Labath via Phabricator < revi...@reviews.llvm.org> wrote: > labath created this revision. > Herald added a subscriber: aprantl.

[Lldb-commits] [PATCH] D29895: Refactor log channel registration mechanism

2017-02-13 Thread Pavel Labath via Phabricator via lldb-commits
labath created this revision. Herald added a subscriber: aprantl. We currently have two log channel registration mechanisms. One uses a set of function pointers and the other one is based on the PluginManager. The PluginManager dependency is unfortunate, as logging is also used in lldb-server, an