Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
7592d1d
Remove JVM AsyncGetCallTrace from TLAB heap sampling.
cloud-profiler-github-robot Jan 21, 2025
bea7056
Automated Code Change
cloud-profiler-github-robot Feb 19, 2025
1cf41d7
Align content with the public roots.pem file.
cloud-profiler-github-robot Mar 5, 2025
dd943a4
Update roots.pem to align with the current public set
psx95 May 14, 2025
769808c
Update roots.pem to align with the current public set
aabmass Sep 3, 2025
f6af548
Update the profile.proto to include some cosmetic changes.
cloud-profiler-github-robot Oct 21, 2025
5992569
Remove unused fields in ProfileProtoBuilder.
cloud-profiler-github-robot Nov 17, 2025
33339d9
Automated Code Change
cloud-profiler-github-robot Nov 24, 2025
6ca8c3e
Remove class name from heap samples. It is unused and is actually a d…
cloud-profiler-github-robot Nov 24, 2025
fb1dc6c
Internal change
cloud-profiler-github-robot Dec 5, 2025
4069a98
Remove local frame skipping support for Java profiles
cloud-profiler-github-robot Dec 8, 2025
c3d6e28
Format C++ code with clang-format.
cloud-profiler-github-robot Feb 12, 2026
0c70878
Dependency cleanup
cloud-profiler-github-robot Feb 12, 2026
ff6c6ca
Dependency cleanup
cloud-profiler-github-robot Feb 12, 2026
217b863
Remove unused parameters for `AllocationInstrumentationFunction` and …
cloud-profiler-github-robot Feb 17, 2026
2c53dde
Add #ifndef guards to DISALLOW_COPY_AND_ASSIGN and DISALLOW_IMPLICIT_…
cloud-profiler-github-robot Feb 19, 2026
44d1b1e
Add a new allocation callback mechanism to support user-defined jvmti…
cloud-profiler-github-robot Mar 18, 2026
48ed5e6
Deprecate `StringId(const char*)` in favor of
cloud-profiler-github-robot Mar 19, 2026
537d9c5
Remove unnecessary .c_str() calls when passing parameter to perftools…
cloud-profiler-github-robot Mar 23, 2026
fdeb000
Redact ASLR entropy from profiles during serialization.
cloud-profiler-github-robot Mar 25, 2026
c40eeda
Internal change.
cloud-profiler-github-robot Mar 26, 2026
a1e9e10
Replace deprecated calls to StringId with the equivalents.
cloud-profiler-github-robot Apr 3, 2026
8e963b9
Don't redact ASLR addresses for mappings that span the entire user sp…
cloud-profiler-github-robot Apr 8, 2026
cdfb1fc
Replace redundant `absl::NullSafeStringView(str.c_str())` with `str`.
cloud-profiler-github-robot Apr 17, 2026
691385c
Remove deprecated StringId overloads
cloud-profiler-github-robot May 13, 2026
72fb008
Update roots.pem to align with the current public set
cloud-profiler-github-robot Jun 9, 2026
1e526c7
Inline usages of deprecated StringIdForMigration
cloud-profiler-github-robot Jun 17, 2026
d818fcf
Delete deprecated StringIdForMigration from Builder.
cloud-profiler-github-robot Jun 18, 2026
7e30b39
Update roots.pem to align with the current public set
cloud-profiler-github-robot Jul 8, 2026
c9691ea
Skip address adjustment for CPU profile leaf frames, as they represen…
cloud-profiler-github-robot Jul 9, 2026
6d07eef
Automated Code Change
cloud-profiler-github-robot Jul 26, 2026
ff577ca
Add GetSamplingInterval to HeapMonitor.
cloud-profiler-github-robot Jul 27, 2026
644cbbb
Make the tests compatible with Ubuntu20.04
psx95 Jul 28, 2026
386024f
Cleanup build file
psx95 Jul 29, 2026
6da4113
Automated Code Change
cloud-profiler-github-robot Jul 31, 2026
5429136
Update roots.pem to align with the current public set
cloud-profiler-github-robot Sep 11, 2026
449bd78
Remove obsolete fallback for pre-2.17 glibc versions.
cloud-profiler-github-robot Sep 29, 2026
ef8f111
Fix TimeAdd 1-second boundary overflow and clock_nanosleep spin
cloud-profiler-github-robot Oct 7, 2026
9379845
Automated Code Change
cloud-profiler-github-robot Oct 12, 2026
f821747
Automated Code Change
cloud-profiler-github-robot Oct 25, 2026
b752121
Zero unmapped Location addresses during ASLR entropy redaction.
cloud-profiler-github-robot Oct 26, 2026
ee5a60d
Zero unmapped Location addresses during ASLR entropy redaction.
cloud-profiler-github-robot Oct 26, 2026
6889480
Add Builder helpers to add and check full-address-space mappings.
cloud-profiler-github-robot Oct 27, 2026
f5b1be6
Remove pre-JDK 21 lambda name simplification logic.
cloud-profiler-github-robot Oct 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 37 additions & 22 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#
# Base image
#
FROM ubuntu:xenial
FROM ubuntu:focal

#
# Dependencies
Expand All @@ -27,12 +27,11 @@ FROM ubuntu:xenial
# Kitware installs CMake v3.20.5

RUN apt-get update && apt-get install -y software-properties-common apt-transport-https ca-certificates gnupg wget && \
add-apt-repository -y ppa:openjdk-r/ppa && \
test -f /usr/share/doc/kitware-archive-keyring/copyright || \
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null \
| gpg --dearmor - \
| tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null && \
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ xenial main' \
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal main' \
| tee /etc/apt/sources.list.d/kitware.list >/dev/null && \
apt-get update && \
apt-get install kitware-archive-keyring
Expand Down Expand Up @@ -82,7 +81,7 @@ RUN git clone --depth=1 -b curl-8_10_1 https://github.com/curl/curl.git /tmp/cur
RUN git clone --depth=1 -b v2.1.2 https://github.com/gflags/gflags.git /tmp/gflags && \
cd /tmp/gflags && \
mkdir build && cd build && \
cmake -DCMAKE_CXX_FLAGS=-fpic -DGFLAGS_NAMESPACE=google .. && \
cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_CXX_FLAGS=-fpic -DGFLAGS_NAMESPACE=google .. && \
make -j && make install && \
cd ~ && rm -rf /tmp/gflags

Expand All @@ -94,46 +93,62 @@ RUN mkdir /tmp/glog && cd /tmp/glog && \
cd ~ && rm -rf /tmp/glog

# gRPC & protobuf - build using CMake
# Use the protobuf version from gRPC for everything to avoid conflicting
# versions to be linked in. Disable OpenSSL embedding: when it's on, the build
# Disable OpenSSL embedding: when it's on, the build
# process of gRPC puts the OpenSSL static object files into the gRPC archive
# which causes link errors later when the agent is linked with the static
# OpenSSL library itself.
# Limit the number of threads used by make, as unlimited threads causes
# memory exhausted error on the Kokoro VM.
# -DCMAKE_CXX_STANDARD=11 is necessary since it is the minimum version supported
# by gRPC dependencies. Xenial sets default version to c++98.
# -DCMAKE_CXX_STANDARD=17 is necessary since it is the minimum version supported
# by gRPC dependencies.
#
# See https://github.com/grpc/grpc/blob/v1.46.7/test/distrib/cpp/run_distrib_test_cmake_pkgconfig.sh
RUN git clone --depth=1 --recursive -b v1.46.7 https://github.com/grpc/grpc.git /tmp/grpc && \
# See https://github.com/grpc/grpc/blob/v1.66.0/test/distrib/cpp/run_distrib_test_cmake_pkgconfig.sh
RUN git clone --depth=1 --recursive -b v1.66.0 https://github.com/grpc/grpc.git /tmp/grpc && \
cd /tmp/grpc/ && \
# Install protobuf
mkdir -p third_party/protobuf/cmake/build && \
(cd third_party/protobuf/cmake/build && \
cmake -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_CXX_STANDARD=11 -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE -DCMAKE_BUILD_TYPE=Release .. && \
make -j4 install) && \
# Install finish - protobuf
# Install gRPC
# Modern Protobuf (v22+) depends on Abseil. To prevent symbol conflicts and undefined references
# when gRPC links against Protobuf, Abseil must be built and installed as a shared system package
# first from gRPC's submodule. Then both Protobuf and gRPC consume it via package (-D..._ABSL_PROVIDER=package).
# Protobuf CMakeLists.txt moved to repo root in newer releases, so we build in third_party/protobuf/build.
# Step 1: Install Abseil as a shared package first
mkdir -p third_party/abseil-cpp/build && \
(cd third_party/abseil-cpp/build && \
cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DABSL_BUILD_TESTING=OFF -DABSL_ENABLE_INSTALL=ON -DCMAKE_CXX_STANDARD=17 -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_LIBDIR=lib .. && \
make -j8 install) && \
# Step 2: Install Protobuf (using shared Abseil package)
mkdir -p third_party/protobuf/build && \
(cd third_party/protobuf/build && \
cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_ABSL_PROVIDER=package -DCMAKE_CXX_STANDARD=17 -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_LIBDIR=lib .. && \
make -j8 install) && \
# Step 3: Install RE2 and generate re2.pc using RE2's official Makefile target (bundled version in gRPC v1.66.0 lacks CMake .pc generation)
mkdir -p third_party/re2/build && \
(cd third_party/re2/build && \
cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DRE2_BUILD_TESTING=OFF -DCMAKE_CXX_STANDARD=17 -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_LIBDIR=lib .. && \
make -j8 install && \
make -C .. common-install prefix=/usr/local) && \
# Step 4: Install gRPC (using shared Abseil, Protobuf, and RE2 packages)
mkdir -p cmake/build && \
(cd cmake/build && \
cmake \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DOPENSSL_ROOT_DIR=/usr/local/ssl \
-DOPENSSL_INCLUDE_DIR=/usr/local/ssl/include \
-DOPENSSL_CRYPTO_LIB=/usr/local/ssl/lib \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_STANDARD=11 \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_INSTALL_PREFIX=/usr/local/grpc \
-DCMAKE_INSTALL_LIBDIR=lib \
-DgRPC_INSTALL=ON \
-DgRPC_BUILD_TESTS=OFF \
-DgRPC_ABSL_PROVIDER=module \
-DgRPC_ABSL_PROVIDER=package \
-DgRPC_CARES_PROVIDER=module \
-DgRPC_RE2_PROVIDER=module \
-DgRPC_RE2_PROVIDER=package \
-DgRPC_ZLIB_PROVIDER=module \
-DgRPC_PROTOBUF_PROVIDER=package \
-DgRPC_SSL_PROVIDER=package \
../.. && \
make -j4 install) && \
make -j8 install) && \
cd ~ && rm -rf /tmp/grpc

ENV PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/usr/local/ssl/lib/pkgconfig:/usr/local/grpc/lib/pkgconfig:/usr/local/lib64/pkgconfig"
# Add /usr/local/grpc/lib64/pkgconfig and /usr/local/lib/pkgconfig as 64-bit builds on Focal may install .pc files there.
ENV PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/usr/local/ssl/lib/pkgconfig:/usr/local/grpc/lib/pkgconfig:/usr/local/grpc/lib64/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/local/lib/x86_64-linux-gnu/pkgconfig:/usr/local/share/pkgconfig"
ENV PATH="${PATH}:/usr/local/grpc/bin"
47 changes: 33 additions & 14 deletions Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ RUN git clone --depth=1 -b curl-8_10_1 https://github.com/curl/curl.git /tmp/cur
RUN git clone --depth=1 -b v2.1.2 https://github.com/gflags/gflags.git /tmp/gflags && \
cd /tmp/gflags && \
mkdir build && cd build && \
cmake -DCMAKE_CXX_FLAGS=-fpic -DGFLAGS_NAMESPACE=google .. && \
cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_CXX_FLAGS=-fpic -DGFLAGS_NAMESPACE=google .. && \
make -j && make install && \
cd ~ && rm -rf /tmp/gflags

Expand All @@ -88,34 +88,53 @@ RUN mkdir /tmp/glog && cd /tmp/glog && \
# Limit the number of threads used by make, as unlimited threads causes
# memory exhausted error on the Kokoro VM.
#
# See https://github.com/grpc/grpc/blob/v1.46.7/test/distrib/cpp/run_distrib_test_cmake_pkgconfig.sh
RUN git clone --depth=1 --recursive -b v1.46.7 https://github.com/grpc/grpc.git /tmp/grpc && \
# See https://github.com/grpc/grpc/blob/v1.66.0/test/distrib/cpp/run_distrib_test_cmake_pkgconfig.sh
RUN git clone --depth=1 --recursive -b v1.66.0 https://github.com/grpc/grpc.git /tmp/grpc && \
cd /tmp/grpc/ && \
# Install protobuf
mkdir -p third_party/protobuf/cmake/build && \
(cd third_party/protobuf/cmake/build && \
cmake -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE -DCMAKE_BUILD_TYPE=Release .. && \
make -j4 install) && \
# Install gRPC
# Modern Protobuf (v22+) depends on Abseil. To prevent symbol conflicts and undefined references
# when gRPC links against Protobuf, Abseil must be built and installed as a shared system package
# first from gRPC's submodule. Then both Protobuf and gRPC consume it via package (-D..._ABSL_PROVIDER=package).
# Protobuf CMakeLists.txt moved to repo root in newer releases, so we build in third_party/protobuf/build.
# Step 1: Install Abseil as a shared package first
mkdir -p third_party/abseil-cpp/build && \
(cd third_party/abseil-cpp/build && \
cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DABSL_BUILD_TESTING=OFF -DABSL_ENABLE_INSTALL=ON -DCMAKE_CXX_STANDARD=17 -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_LIBDIR=lib .. && \
make -j8 install) && \
# Step 2: Install Protobuf (using shared Abseil package)
mkdir -p third_party/protobuf/build && \
(cd third_party/protobuf/build && \
cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_ABSL_PROVIDER=package -DCMAKE_CXX_STANDARD=17 -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_LIBDIR=lib .. && \
make -j8 install) && \
# Step 3: Install RE2 and generate re2.pc using RE2's official Makefile target (bundled version in gRPC v1.66.0 lacks CMake .pc generation)
mkdir -p third_party/re2/build && \
(cd third_party/re2/build && \
cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DRE2_BUILD_TESTING=OFF -DCMAKE_CXX_STANDARD=17 -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_LIBDIR=lib .. && \
make -j8 install && \
make -C .. common-install prefix=/usr/local) && \
# Step 4: Install gRPC (using shared Abseil, Protobuf, and RE2 packages)
mkdir -p cmake/build && \
cd cmake/build && \
(cd cmake/build && \
cmake \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DOPENSSL_ROOT_DIR=/usr/local/ssl \
-DOPENSSL_INCLUDE_DIR=/usr/local/ssl/include \
-DOPENSSL_CRYPTO_LIB=/usr/local/ssl/lib \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_INSTALL_PREFIX=/usr/local/grpc \
-DCMAKE_INSTALL_LIBDIR=lib \
-DgRPC_INSTALL=ON \
-DgRPC_BUILD_TESTS=OFF \
-DgRPC_ABSL_PROVIDER=module \
-DgRPC_ABSL_PROVIDER=package \
-DgRPC_CARES_PROVIDER=module \
-DgRPC_RE2_PROVIDER=module \
-DgRPC_RE2_PROVIDER=package \
-DgRPC_ZLIB_PROVIDER=module \
-DgRPC_PROTOBUF_PROVIDER=package \
-DgRPC_SSL_PROVIDER=package \
../.. && \
make -j4 install && \
make -j8 install) && \
cd ~ && rm -rf /tmp/grpc

ENV PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/usr/local/ssl/lib/pkgconfig:/usr/local/grpc/lib/pkgconfig:/usr/local/grpc/lib64/pkgconfig:/usr/local/lib64/pkgconfig"
# Add /usr/local/grpc/lib64/pkgconfig and /usr/local/lib/pkgconfig as 64-bit builds on Alpine may install .pc files there.
ENV PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/usr/local/ssl/lib/pkgconfig:/usr/local/grpc/lib/pkgconfig:/usr/local/grpc/lib64/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/local/lib/x86_64-linux-gnu/pkgconfig:/usr/local/share/pkgconfig"
ENV PATH="${PATH}:/usr/local/grpc/bin"
15 changes: 12 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ CC = g++
machine_type := $(shell uname -m)

# -fpermissive used to bypass <:: errors from gcc 4.7
# -std=c++17 is required by gRPC v1.58+ and modern Abseil dependencies.
CFLAGS = \
-std=c++11 \
-std=c++17 \
-fpermissive \
-fPIC \
-Wall \
Expand All @@ -31,7 +32,7 @@ CFLAGS = \
-g0 \
-DSTANDALONE_BUILD \
-D_GNU_SOURCE \
$(shell pkg-config --cflags protobuf grpc)
$(shell PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/usr/local/ssl/lib/pkgconfig:/usr/local/grpc/lib/pkgconfig:/usr/local/grpc/lib64/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/local/lib/x86_64-linux-gnu/pkgconfig:/usr/local/share/pkgconfig" pkg-config --cflags protobuf grpc++)

ifeq ($(machine_type),$(filter $(machine_type),aarch64 arm64))
# Building on an ARM64 machine.
Expand Down Expand Up @@ -69,6 +70,7 @@ INCLUDES = \
-I$(GENFILES_PATH) \
-I$(GENFILES_PATH)/third_party \
-I$(INCLUDE_PATH) \
-I/usr/local/grpc/include \
-I$(PROTOBUF_INCLUDE_PATH) \

TARGET_AGENT = $(OUT_PATH)/profiler_java_agent.so
Expand All @@ -77,6 +79,7 @@ TARGET_NOTICES = $(OUT_PATH)/NOTICES
PROFILE_PROTO_SOURCES = \
$(GENFILES_PATH)/$(PROFILE_PROTO_PATH)/profile.pb.cc \
$(PROFILE_PROTO_PATH)/builder.cc \
$(PROFILE_PROTO_PATH)/aslr.cc \

PROFILER_API_SOURCES = \
$(GENFILES_PATH)/google/api/annotations.pb.cc \
Expand Down Expand Up @@ -163,19 +166,25 @@ HEADERS = \

VERSION_SCRIPT = $(JAVA_AGENT_PATH)/cloud_profiler_java_agent.lds
OPT_FLAGS = -O3
LDFLAGS = -L/usr/local/lib -static-libstdc++ -shared $(shell pkg-config --libs --static protobuf grpc++)
# Static libraries for Protobuf, gRPC, and Abseil are wrapped in -Wl,--start-group ... -Wl,--end-group
# to resolve cyclic symbol dependencies between generated protobuf code, gRPC, and Abseil logging/debugging internals.
LDFLAGS = -L/usr/local/lib -L/usr/local/grpc/lib -L/usr/local/grpc/lib64 -static-libstdc++ -shared -Wl,--start-group $(shell PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/usr/local/ssl/lib/pkgconfig:/usr/local/grpc/lib/pkgconfig:/usr/local/grpc/lib64/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/local/lib/x86_64-linux-gnu/pkgconfig:/usr/local/share/pkgconfig" pkg-config --libs --static protobuf grpc++) -labsl_log_internal_message -labsl_log_internal_check_op -labsl_log_internal_nullguard -labsl_die_if_null -labsl_examine_stack -labsl_log_internal_format -labsl_log_internal_proto -labsl_log_internal_log_sink_set -labsl_log_sink -labsl_log_entry -labsl_log_globals -labsl_symbolize -labsl_stacktrace -labsl_debugging_internal -labsl_demangle_internal -labsl_time -labsl_time_zone -labsl_civil_time -labsl_str_format_internal -labsl_strings -labsl_strings_internal -labsl_int128 -labsl_base -labsl_raw_logging_internal -labsl_spinlock_wait -labsl_throw_delegate -labsl_bad_optional_access -labsl_bad_variant_access -Wl,--end-group
LDS_FLAGS = -Wl,-z,defs -Wl,--version-script=$(VERSION_SCRIPT)

LIB_ROOT_PATH ?= /usr/local

# Linking OpenSSL statically as different distributions have different version
# of the libraries, including different soname. And we'd prefer to have a single
# agent binary which runs everywhere.
# Static libssl.a, libcrypto.a, and -lz must come after libcurl.a to satisfy encryption and compression symbol requirements.
LIBS1= \
-ldl \
-lrt \
-pthread \
$(LIB_ROOT_PATH)/lib/libcurl.a \
$(LIB_ROOT_PATH)/ssl/lib/libssl.a \
$(LIB_ROOT_PATH)/ssl/lib/libcrypto.a \
-lz \
$(LIB_ROOT_PATH)/lib/libglog.a \
$(LIB_ROOT_PATH)/lib/libgflags.a \

Expand Down
4 changes: 0 additions & 4 deletions src/cloud_env.cc
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,7 @@ std::string GceMetadataRequest(HTTPRequest* req, const std::string& path) {
}

const char* Getenv(const std::string& var) {
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 17) || ALPINE == 1
return secure_getenv(var.c_str());
#else
return __secure_getenv(var.c_str());
#endif
}

} // namespace
Expand Down
2 changes: 1 addition & 1 deletion src/cloud_env.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class CloudEnv {
CloudEnv(const CloudEnv&) = delete;
CloudEnv& operator=(const CloudEnv&) = delete;

virtual ~CloudEnv() {}
virtual ~CloudEnv() = default;

// Returns the current cloud project ID.
virtual std::string ProjectID();
Expand Down
4 changes: 4 additions & 0 deletions src/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,17 @@ using std::string; // ALLOW_STD_STRING

#define FRIEND_TEST(A, B)

#ifndef DISALLOW_COPY_AND_ASSIGN
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
TypeName(const TypeName &); \
void operator=(const TypeName &)
#endif // DISALLOW_COPY_AND_ASSIGN

#ifndef DISALLOW_IMPLICIT_CONSTRUCTORS
#define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
TypeName(); \
DISALLOW_COPY_AND_ASSIGN(TypeName)
#endif // DISALLOW_IMPLICIT_CONSTRUCTORS

#ifndef CLOUD_PROFILER_AGENT_VERSION
#define CLOUD_PROFILER_AGENT_VERSION "unknown"
Expand Down
Loading
Loading