[PATCH] D121179: [memprof] Store callsite metadata with memprof records.

Mitch Phillips via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 21 15:57:57 PDT 2022


hctim added inline comments.


================
Comment at: llvm/include/llvm/ProfileData/MemProf.h:236
+    bool operator==(const AllocationInfo &Other) const {
+      if (Other.Info != Info)
+        return false;
----------------
Hi, looks like this patch causes the MemorySanitizer build bot to fail:

See instructions [here](https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild) on how to reproduce:


```
********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90
FAIL: LLVM-Unit :: ProfileData/./ProfileDataTests/MemProf.RecordSerializationRoundTrip (78166 of 82953)
******************** TEST 'LLVM-Unit :: ProfileData/./ProfileDataTests/MemProf.RecordSerializationRoundTrip' FAILED ********************
Script:
--
/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/unittests/ProfileData/./ProfileDataTests --gtest_filter=MemProf.RecordSerializationRoundTrip
--
Note: Google Test filter = MemProf.RecordSerializationRoundTrip
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from MemProf
[ RUN      ] MemProf.RecordSerializationRoundTrip
==47398==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x4ae582 in llvm::memprof::MemProfRecord::AllocationInfo::operator==(llvm::memprof::MemProfRecord::AllocationInfo const&) const /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/ProfileData/MemProf.h:236:11
    #1 0x4adb6a in operator!= /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/ProfileData/MemProf.h:250:15
    #2 0x4adb6a in llvm::memprof::MemProfRecord::operator==(llvm::memprof::MemProfRecord const&) const /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/ProfileData/MemProf.h:319:25
    #3 0x589fc6 in (anonymous namespace)::EqualsRecordMatcherP<llvm::memprof::MemProfRecord>::gmock_Impl<llvm::memprof::MemProfRecord const&>::MatchAndExplain(llvm::memprof::MemProfRecord const&, testing::MatchResultListener*) const /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/unittests/ProfileData/MemProfTest.cpp:111:11
    #4 0x585c50 in MatchAndExplain /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/googletest/include/gtest/gtest-matchers.h:264:19
    #5 0x585c50 in Matches /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/googletest/include/gtest/gtest-matchers.h:270:12
    #6 0x585c50 in operator()<llvm::memprof::MemProfRecord> /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/googlemock/include/gmock/gmock-matchers.h:1327:17
    #7 0x585c50 in (anonymous namespace)::MemProf_RecordSerializationRoundTrip_Test::TestBody() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/unittests/ProfileData/MemProfTest.cpp:300:3
    #8 0xa56c69 in HandleExceptionsInMethodIfSupported<testing::Test, void> /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc
    #9 0xa56c69 in testing::Test::Run() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:2508:5
    #10 0xa5ba53 in testing::TestInfo::Run() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:2684:11
    #11 0xa5d14e in testing::TestSuite::Run() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:2816:28
    #12 0xa8be08 in testing::internal::UnitTestImpl::RunAllTests() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:5338:44
    #13 0xa8a443 in HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc
    #14 0xa8a443 in testing::UnitTest::Run() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:4925:10
    #15 0xa3b70e in RUN_ALL_TESTS /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/googletest/include/gtest/gtest.h:2472:46
    #16 0xa3b70e in main /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/UnitTestMain/TestMain.cpp:55:10
    #17 0x7fbb240a409a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a) (BuildId: 18b9a9a8c523e5cfe5b5d946d605d09242f09798)
    #18 0x379e39 in _start (/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/unittests/ProfileData/ProfileDataTests+0x379e39)
```



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121179/new/

https://reviews.llvm.org/D121179



More information about the llvm-commits mailing list