[PATCH] D43901: Make STATISTIC() values available programmatically

Roman Tereshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 1 22:35:58 PST 2018


rtereshin accepted this revision.
rtereshin added a comment.
This revision is now accepted and ready to land.

LGTM

My only concern here is that I don't quite understand why only the `ManagedStatic<StatisticInfo> StatInfo`'s writer is guarded by a mutex, but non of the readers. As the newly added `GetStatistics()` method leaks a read-access to `StatInfo` into the wild losing any control over it, it might be a problem.

Could you please clarify that a little bit?

Thanks! I really like the direction this is going =)


Repository:
  rL LLVM

https://reviews.llvm.org/D43901





More information about the llvm-commits mailing list