[all-commits] [llvm/llvm-project] 0a5576: scudo: Store header on deallocation before retaggi...

pcc via All-commits all-commits at lists.llvm.org
Fri Apr 23 09:32:42 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0a5576ecf05f810065b6562605f1cbe78fee2988
      https://github.com/llvm/llvm-project/commit/0a5576ecf05f810065b6562605f1cbe78fee2988
  Author: Peter Collingbourne <peter at pcc.me.uk>
  Date:   2021-04-23 (Fri, 23 Apr 2021)

  Changed paths:
    M compiler-rt/lib/scudo/standalone/combined.h

  Log Message:
  -----------
  scudo: Store header on deallocation before retagging memory.

>From a cache perspective it's better to store the header immediately
after loading it. If we delay this operation until after we've
retagged it's more likely that our header will have been evicted from
the cache and we'll need to fetch it again in order to perform the
compare-exchange operation.

For similar reasons, store the deallocation stack before retagging
instead of afterwards.

Differential Revision: https://reviews.llvm.org/D101137




More information about the All-commits mailing list