[PATCH] D155993: [llvm-debuginfod] Switch to xxh3_64bits
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 31 14:48:25 PDT 2023
MaskRay updated this revision to Diff 545820.
MaskRay added a comment.
Herald added a reviewer: jhenderson.
fix tests
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155993/new/
https://reviews.llvm.org/D155993
Files:
llvm/lib/Debuginfod/Debuginfod.cpp
llvm/test/tools/llvm-objdump/debuginfod.test
llvm/test/tools/llvm-symbolizer/debuginfod.test
Index: llvm/test/tools/llvm-symbolizer/debuginfod.test
===================================================================
--- llvm/test/tools/llvm-symbolizer/debuginfod.test
+++ 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.
Index: llvm/test/tools/llvm-objdump/debuginfod.test
===================================================================
--- llvm/test/tools/llvm-objdump/debuginfod.test
+++ 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
Index: llvm/lib/Debuginfod/Debuginfod.cpp
===================================================================
--- llvm/lib/Debuginfod/Debuginfod.cpp
+++ llvm/lib/Debuginfod/Debuginfod.cpp
@@ -47,7 +47,7 @@
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155993.545820.patch
Type: text/x-patch
Size: 4148 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230731/0a70f7b4/attachment.bin>
More information about the llvm-commits
mailing list