[PATCH] D20408: [profile] entry eviction support in value profiler

Rong Xu via llvm-commits llvm-commits at lists.llvm.org
Thu May 19 10:49:54 PDT 2016


xur added a comment.

The eviction method is good. My concerns is we don't using lock in this function, there are chances of corrupted data in threaded programs. This eviction mechanism seems to increase the chances. And previously the corruption will only be count values. Now it could be targets.  I would suggest to use atomic in setting the target when replacing.

Another related question: The counter allocation uses atomic operation. Why not the counter updates also using atomic?

-Rong


http://reviews.llvm.org/D20408





More information about the llvm-commits mailing list