[all-commits] [llvm/llvm-project] 937241: [profile] Do not cache __llvm_profile_get_filename...

Vedant Kumar via All-commits all-commits at lists.llvm.org
Fri Oct 18 16:32:38 PDT 2019

  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 937241b0d9e8f896d4387292f01abf18ba9f9fcb
  Author: Vedant Kumar <vsk at apple.com>
  Date:   2019-10-18 (Fri, 18 Oct 2019)

  Changed paths:
    M clang/lib/Driver/ToolChains/Darwin.cpp
    M clang/test/Driver/darwin-ld.c
    M compiler-rt/lib/profile/InstrProfiling.h
    M compiler-rt/lib/profile/InstrProfilingFile.c
    A compiler-rt/test/profile/Inputs/instrprof-get-filename-dso.c
    R compiler-rt/test/profile/Posix/instrprof-set-filename-shared.test
    A compiler-rt/test/profile/instrprof-get-filename-merge-mode.c

  Log Message:
  [profile] Do not cache __llvm_profile_get_filename result

When the %m filename pattern is used, the filename is unique to each
image, so the cached value is wrong.

It struck me that the full filename isn't something that's recomputed
often, so perhaps it doesn't need to be cached at all. David Li pointed
out we can go further and just hide lprofCurFilename. This may regress
workflows that depend on using the set-filename API to change filenames
across all loaded DSOs, but this is expected to be very rare.


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

llvm-svn: 375301

More information about the All-commits mailing list