diff --git a/llvm/lib/Debuginfod/Debuginfod.cpp b/llvm/lib/Debuginfod/Debuginfod.cpp --- a/llvm/lib/Debuginfod/Debuginfod.cpp +++ b/llvm/lib/Debuginfod/Debuginfod.cpp @@ -47,7 +47,9 @@ using llvm::object::BuildIDRef; -static std::string uniqueKey(llvm::StringRef S) { return utostr(xxHash64(S)); } +static std::string uniqueKey(llvm::StringRef S) { + return utostr(xxh3_64bits(S)); +} // Returns a binary BuildID as a normalized hex string. // Uses lowercase for compatibility with common debuginfod servers. diff --git a/llvm/test/tools/llvm-debuginfod-find/cache.test b/llvm/test/tools/llvm-debuginfod-find/cache.test --- a/llvm/test/tools/llvm-debuginfod-find/cache.test +++ b/llvm/test/tools/llvm-debuginfod-find/cache.test @@ -27,12 +27,12 @@ RUN: llvm-debuginfod-find --debuginfo 0123456789012346 > /dev/null RUN: ls %t/cache | FileCheck --check-prefix=BOTH --match-full-lines --implicit-check-not {{.}} %s -FIRST: llvmcache-6663022027345102449 +FIRST: llvmcache-10846399329613630737 FIRST: llvmcache.timestamp -SECOND: llvmcache-6762748755046480574 +SECOND: llvmcache-10192351353398627645 SECOND: llvmcache.timestamp -BOTH: llvmcache-6663022027345102449 -BOTH: llvmcache-6762748755046480574 +BOTH: llvmcache-10192351353398627645 +BOTH: llvmcache-10846399329613630737 BOTH: llvmcache.timestamp diff --git a/llvm/test/tools/llvm-objdump/debuginfod.test b/llvm/test/tools/llvm-objdump/debuginfod.test --- a/llvm/test/tools/llvm-objdump/debuginfod.test +++ b/llvm/test/tools/llvm-objdump/debuginfod.test @@ -15,15 +15,15 @@ # Use cp to write the debug binary to an appropriately-named file in the llvm # debuginfod cache. -RUN: cp %p/Inputs/embedded-source %t/llvmcache-7361776989772977641 +RUN: cp %p/Inputs/embedded-source %t/llvmcache-17908201640401622315 # Write a broken "binary" under %t/broken. RUN: mkdir %t/broken -RUN: echo "bad" > %t/broken/llvmcache-7361776989772977641 +RUN: echo "bad" > %t/broken/llvmcache-17908201640401622315 # Write the stripped binary under %t/stripped-cache. RUN: mkdir %t/stripped-cache -RUN: cp %t/stripped %t/stripped-cache/llvmcache-7361776989772977641 +RUN: cp %t/stripped %t/stripped-cache/llvmcache-17908201640401622315 # Write to a debug info directory as well. RUN: mkdir -p %t/debug/.build-id/15 @@ -53,7 +53,7 @@ RUN: %t/stripped 2> %t.err | \ RUN: FileCheck %s --check-prefix=NOTFOUND RUN: FileCheck %s --check-prefix=BADBINARYERROR -DPATH=%t --input-file %t.err -BADBINARYERROR: warning: '[[PATH]]/broken{{[/\\]}}llvmcache-7361776989772977641': The file was not recognized as a valid object file +BADBINARYERROR: warning: '[[PATH]]/broken{{[/\\]}}llvmcache-17908201640401622315': The file was not recognized as a valid object file # Use the original binary if the fetched binary has no debug info. RUN: env DEBUGINFOD_CACHE_PATH=%t/stripped-cache llvm-objdump -d --source \ @@ -86,8 +86,8 @@ # Use debuginfod to recover section headers, but not symbols. RUN: mkdir %t/stripped-symbols -RUN: cp %p/Inputs/embedded-source %t/stripped-symbols/llvmcache-7361776989772977641 -RUN: llvm-strip %t/stripped-symbols/llvmcache-7361776989772977641 +RUN: cp %p/Inputs/embedded-source %t/stripped-symbols/llvmcache-17908201640401622315 +RUN: llvm-strip %t/stripped-symbols/llvmcache-17908201640401622315 RUN: env DEBUGINFOD_CACHE_PATH=%t/stripped-symbols llvm-objdump -d \ RUN: --debuginfod %t/stripped | \ RUN: FileCheck %s --check-prefix=SECTIONS @@ -95,8 +95,8 @@ # Don't use debuginfod if neither section headers nor symbols can be recovered. RUN: mkdir %t/stripped-sections RUN: echo "" | llvm-mc -filetype=obj -triple x86_64 > \ -RUN: %t/stripped-sections/llvmcache-7361776989772977641 -RUN: llvm-strip --strip-sections %t/stripped-sections/llvmcache-7361776989772977641 +RUN: %t/stripped-sections/llvmcache-17908201640401622315 +RUN: llvm-strip --strip-sections %t/stripped-sections/llvmcache-17908201640401622315 RUN: env DEBUGINFOD_CACHE_PATH=%t/stripped-sections llvm-objdump -d \ RUN: --debuginfod %t/stripped | \ RUN: FileCheck %s --check-prefix=NOSECTIONS diff --git a/llvm/test/tools/llvm-symbolizer/debuginfod.test b/llvm/test/tools/llvm-symbolizer/debuginfod.test --- a/llvm/test/tools/llvm-symbolizer/debuginfod.test +++ b/llvm/test/tools/llvm-symbolizer/debuginfod.test @@ -16,9 +16,9 @@ # Use llvm-objcopy to write the debuginfo of the addr.exe binary to an # appropriately-named file in the llvm debuginfod cache. The filename is # determined by the debuginfod client's caching scheme, so it is manually -# specified here as llvmcache-98...19 +# specified here as llvmcache-\d+ RUN: llvm-objcopy --keep-section=.debug_info %p/Inputs/addr.exe \ -RUN: %t/llvmcache-9800707741016212219 +RUN: %t/llvmcache-1165050469834211050 # The symbolizer should call the debuginfod client library, which finds the # debuginfo placed in the cache, enabling symbolization of the address.