diff --git a/MODULE.bazel b/MODULE.bazel index bdba9667..43cdc9a7 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -4,25 +4,25 @@ module( compatibility_level = 1, ) -bazel_dep(name = "rules_cc", version = "0.1.5") +bazel_dep(name = "rules_cc", version = "0.2.14") # GoogleTest/GoogleMock framework. Used by most unit-tests. bazel_dep( name = "googletest", - version = "1.11.0", + version = "1.17.0.bcr.2", repo_name = "com_google_googletest", ) # zlib, used by proto builders. bazel_dep( name = "zlib", - version = "1.3.1", + version = "1.3.1.bcr.5", ) # Proto rules for Bazel and Protobuf bazel_dep( name = "protobuf", - version = "31.1", + version = "33.4", repo_name = "com_google_protobuf", ) bazel_dep( @@ -31,10 +31,10 @@ bazel_dep( ) bazel_dep( name = "gflags", - version = "2.2.2", + version = "2.2.2.bcr.1", repo_name = "com_github_gflags_gflags", ) bazel_dep( name = "abseil-cpp", - version = "20250512.0", + version = "20250814.1", ) diff --git a/ci/linux_clang-latest_libcxx_bazel.sh b/ci/linux_clang-latest_libcxx_bazel.sh index 293db74d..86f5acc0 100755 --- a/ci/linux_clang-latest_libcxx_bazel.sh +++ b/ci/linux_clang-latest_libcxx_bazel.sh @@ -9,22 +9,26 @@ set -euox pipefail if [ -z "${PDC_ROOT:-}" ]; then PDC_ROOT="$(realpath $(dirname ${0})/..)" + PDC_ROOT_DIR_NAME=$(basename "${PDC_ROOT}") + PDC_HOST_ROOT="${KOKORO_HOST_ROOT_DIR}/src/git/${PDC_ROOT_DIR_NAME}" fi # This container is a reasonable start but is missing some prerequisite libs and # an installation of linux_perf. We'll manually add them below. -readonly DOCKER_CONTAINER="gcr.io/google.com/absl-177019/linux_hybrid-latest:20231218" +readonly DOCKER_CONTAINER="gcr.io/google.com/absl-177019/linux_hybrid-latest:20260131" time docker run \ - --volume="${PDC_ROOT}:/perf_data_converter:ro" \ + --mount "type=bind,src=${PDC_HOST_ROOT},target=/perf_data_converter" \ --workdir=/perf_data_converter \ --cap-add=SYS_PTRACE \ --rm \ -i \ - -e CC="/opt/llvm/clang/bin/clang" \ + -e CC="/opt/llvm/bin/clang" \ -e BAZEL_CXXOPTS="-nostdinc++" \ -e BAZEL_LINKOPTS="-L/opt/llvm/libcxx/lib:-lc++:-lc++abi:-lm:-Wl,-rpath=/opt/llvm/libcxx/lib" \ -e CPLUS_INCLUDE_PATH="/opt/llvm/libcxx/include/c++/v1" \ + -e BAZEL_LINKOPTS="-L/opt/llvm/lib/x86_64-unknown-linux-gnu:-lc++:-lc++abi:-lm:-Wl,-rpath=/opt/llvm/lib/x86_64-unknown-linux-gnu" \ + -e CPLUS_INCLUDE_PATH="/opt/llvm/include/c++/v1:/opt/llvm/include/x86_64-unknown-linux-gnu/c++/v1/" \ ${DOCKER_EXTRA_ARGS:-} \ ${DOCKER_CONTAINER} \ bash <tellp(); - out->write(reinterpret_cast(event.get()), event_size); + out->write(reinterpret_cast(event.get()), + event_size - sample_id_.size()); + out->write(sample_id_.data(), sample_id_.size()); const size_t written_event_size = static_cast(out->tellp()) - previous_offset; CHECK_EQ(event_size, static_cast(written_event_size)); diff --git a/src/quipper/test_perf_data.h b/src/quipper/test_perf_data.h index 2561a0a9..1f0a0fbd 100644 --- a/src/quipper/test_perf_data.h +++ b/src/quipper/test_perf_data.h @@ -958,14 +958,18 @@ class ExampleKsymbolEvent : public StreamWriteable { class ExampleBpfMetadataEvent : public StreamWriteable { public: ExampleBpfMetadataEvent(std::string prog_name, - std::vector entries) - : prog_name_(prog_name), entries_(std::move(entries)) {} + std::vector entries, + const SampleInfo& sample_id) + : prog_name_(prog_name), + entries_(std::move(entries)), + sample_id_(sample_id) {} size_t GetSize() const; void WriteTo(std::ostream* out) const override; private: const std::string prog_name_; const std::vector entries_; + const SampleInfo sample_id_; }; } // namespace testing