Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
33dbbe4
Replace "NULL" and "0" with "nullptr".
Jan 27, 2022
1be226a
Add contention and threads profile types to throttler.
Feb 4, 2022
aab0dd1
fix: relax service name regexp to allow service name to start with nu…
nolanmar511 May 6, 2022
596bf18
Allow use of AsyncGetCallTrace for TLAB heap sampling, which is faste…
dthomson-commits Jun 27, 2022
49cb69e
Update roots.pem to align with the current public set
Jun 27, 2022
e09f17f
chore: update CONTRIBUTING.md
nolanmar511 Jul 7, 2022
b4f90d5
Prepare for requiring default_sample_type to always be present.
Jul 22, 2022
a68992c
Prepare for requiring default_sample_type to always be present.
Jul 23, 2022
5c8cca3
Prepare for requiring default_sample_type to always be present.
Aug 2, 2022
f1be5e4
Don't attempt to skip C++->Java JNI frames in profile traces.
dthomson-commits Aug 3, 2022
47d6e25
Subtract one from native addresses in profiles.
dthomson-commits Aug 15, 2022
4fa940a
Enable `HeapMonitor` to register, store, and invoke allocation instru…
Aug 22, 2022
7df9663
Enable `HeapMonitor` and `HeapEventStorage` to register, store, and i…
Sep 2, 2022
dc8f157
Enable `HeapMonitor` and `HeapEventStorage` to register, store, and i…
dthomson-commits Sep 2, 2022
5f9e12c
Enable `HeapMonitor` and `HeapEventStorage` to register, store, and i…
Sep 14, 2022
4d4d81d
fix: Enable test-only builds on ARM64
Sep 28, 2022
911084c
Consolidate constant for stack size limit.
Oct 28, 2022
6c44a3c
Fill Function.start_line for Java profiles.
Nov 14, 2022
153e5b6
Make Builder::MarshalToFile output overwritable so that repetitive pr…
aalexand Nov 29, 2022
6127512
Fix go install error
Dec 10, 2022
645c79b
Internal change.
Dec 12, 2022
93ac6e0
Fix TSAN errors in the TLAB-based heap profiler
dthomson-commits Dec 14, 2022
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
25 changes: 0 additions & 25 deletions .github/workflows/ci.yml

This file was deleted.

29 changes: 1 addition & 28 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,28 +1 @@
# How to Contribute

We'd love to accept your patches and contributions to this project. There are
just a few small guidelines you need to follow.

## Contributor License Agreement

Contributions to this project must be accompanied by a Contributor License
Agreement. You (or your employer) retain the copyright to your contribution;
this simply gives us permission to use and redistribute your contributions as
part of the project. Head over to <https://cla.developers.google.com/> to see
your current agreements on file or to sign a new one.

You generally only need to submit a CLA once, so if you've already submitted one
(even if it was for a different project), you probably don't need to do it
again.

## Code reviews

All submissions, including submissions by project members, require review. We
use GitHub pull requests for this purpose. Consult
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
information on using pull requests.

## Community Guidelines

This project follows [Google's Open Source Community
Guidelines](https://opensource.google.com/conduct/).
This repo cannot currently accept open source contributions.
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ RUN git clone --depth=1 -b curl-7_69_1 https://github.com/curl/curl.git /tmp/cur
./buildconf && \
./configure --disable-ldap --disable-shared --without-libssh2 \
--without-librtmp --without-libidn --enable-static \
--without-libidn2 \
--with-pic --with-ssl=/usr/local/ssl/ && \
make -j && make install && \
cd ~ && rm -rf /tmp/curl
Expand All @@ -86,13 +87,15 @@ RUN mkdir /tmp/glog && cd /tmp/glog && \
# 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.
RUN git clone --depth=1 --recursive -b v1.28.1 https://github.com/grpc/grpc.git /tmp/grpc && \
cd /tmp/grpc && \
cd third_party/protobuf && \
./autogen.sh && \
./configure --with-pic CXXFLAGS="$(pkg-config --cflags protobuf)" LIBS="$(pkg-config --libs protobuf)" LDFLAGS="-Wl,--no-as-needed" && \
make -j && make install && ldconfig && \
make -j4 && make install && ldconfig && \
cd ../.. && \
CPPFLAGS="-I /usr/local/ssl/include" LDFLAGS="-L /usr/local/ssl/lib/ -Wl,--no-as-needed" make -j CONFIG=opt EMBED_OPENSSL=false V=1 HAS_SYSTEM_OPENSSL_NPN=0 && \
CPPFLAGS="-I /usr/local/ssl/include" LDFLAGS="-L /usr/local/ssl/lib/ -Wl,--no-as-needed" make -j4 CONFIG=opt EMBED_OPENSSL=false V=1 HAS_SYSTEM_OPENSSL_NPN=0 && \
CPPFLAGS="-I /usr/local/ssl/include" LDFLAGS="-L /usr/local/ssl/lib/ -Wl,--no-as-needed" make CONFIG=opt EMBED_OPENSSL=false V=1 HAS_SYSTEM_OPENSSL_NPN=0 install && \
rm -rf /tmp/grpc
7 changes: 5 additions & 2 deletions Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ RUN git clone --depth=1 -b curl-7_69_1 https://github.com/curl/curl.git /tmp/cur
./buildconf && \
./configure --disable-ldap --disable-shared --without-libssh2 \
--without-librtmp --without-libidn --enable-static \
--without-libidn2 \
--with-pic --with-ssl=/usr/local/ssl/ && \
make -j && make install && \
cd ~ && rm -rf /tmp/curl
Expand All @@ -85,13 +86,15 @@ RUN mkdir /tmp/glog && cd /tmp/glog && \
# 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.
RUN git clone --depth=1 --recursive -b v1.28.1 https://github.com/grpc/grpc.git /tmp/grpc && \
cd /tmp/grpc && \
cd third_party/protobuf && \
./autogen.sh && \
./configure --with-pic CXXFLAGS="$(pkg-config --cflags protobuf)" LIBS="$(pkg-config --libs protobuf)" LDFLAGS="-Wl,--no-as-needed" && \
make -j && make install && ldconfig / && \
make -j4 && make install && ldconfig / && \
cd ../.. && \
CPPFLAGS="-I /usr/local/ssl/include" LDFLAGS="-L /usr/local/ssl/lib/ -Wl,--no-as-needed" make -j CONFIG=opt EMBED_OPENSSL=false V=1 HAS_SYSTEM_OPENSSL_NPN=0 && \
CPPFLAGS="-I /usr/local/ssl/include" LDFLAGS="-L /usr/local/ssl/lib/ -Wl,--no-as-needed" make -j4 CONFIG=opt EMBED_OPENSSL=false V=1 HAS_SYSTEM_OPENSSL_NPN=0 && \
CPPFLAGS="-I /usr/local/ssl/include" LDFLAGS="-L /usr/local/ssl/lib/ -Wl,--no-as-needed" make CONFIG=opt EMBED_OPENSSL=false V=1 HAS_SYSTEM_OPENSSL_NPN=0 install && \
rm -rf /tmp/grpc
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ PROFILER_API_SOURCES = \
$(GENFILES_PATH)/google/api/annotations.pb.cc \
$(GENFILES_PATH)/google/api/client.pb.cc \
$(GENFILES_PATH)/google/api/http.pb.cc \
$(GENFILES_PATH)/google/api/launch_stage.pb.cc \
$(GENFILES_PATH)/google/devtools/cloudprofiler/v2/profiler.grpc.pb.cc \
$(GENFILES_PATH)/google/devtools/cloudprofiler/v2/profiler.pb.cc \
$(GENFILES_PATH)/google/protobuf/duration.pb.cc \
Expand Down Expand Up @@ -231,6 +232,10 @@ $(GENFILES_PATH)/%annotations.pb.h $(GENFILES_PATH)/%annotations.pb.cc : third_p
mkdir -p $(dir $@)
$(PROTOC) -Ithird_party/googleapis -I$(PROTOBUF_INCLUDE_PATH) --cpp_out=$(GENFILES_PATH) $<

$(GENFILES_PATH)/%launch_stage.pb.h $(GENFILES_PATH)/%launch_stage.pb.cc : third_party/googleapis/%launch_stage.proto
mkdir -p $(dir $@)
$(PROTOC) -Ithird_party/googleapis -I$(PROTOBUF_INCLUDE_PATH) --cpp_out=$(GENFILES_PATH) $<

$(GENFILES_PATH)/%client.pb.h $(GENFILES_PATH)/%client.pb.cc : third_party/googleapis/%client.proto
mkdir -p $(dir $@)
$(PROTOC) -Ithird_party/googleapis -I$(PROTOBUF_INCLUDE_PATH) --cpp_out=$(GENFILES_PATH) $<
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ while getopts ":d:m:v:" opt; do
m)
TARGET=$OPTARG
if [[ "${TARGET}" == "arm64" ]]; then
if [[ "${MACHINE_TYPE}" != "aarch64" ]] || [[ "${MACHINE_TYPE}" != "arm64" ]]; then
if [[ "${MACHINE_TYPE}" != "aarch64" ]] && [[ "${MACHINE_TYPE}" != "arm64" ]]; then
echo "-m arm64 is supported only when running on an ARM64 system."
exit;
fi
Expand Down
11 changes: 7 additions & 4 deletions src/entry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void CreateJMethodIDsForClass(jvmtiEnv *jvmti, jclass klass) {
// JVMTI_ERROR_CLASS_NOT_PREPARED is okay because some classes may
// be loaded but not prepared at this point.
google::javaprofiler::JvmtiScopedPtr<char> ksig(jvmti);
JVMTI_ERROR((jvmti->GetClassSignature(klass, ksig.GetRef(), NULL)));
JVMTI_ERROR((jvmti->GetClassSignature(klass, ksig.GetRef(), nullptr)));
LOG(ERROR) << "Failed to create method IDs for methods in class "
<< ksig.Get() << " with error " << e;
}
Expand All @@ -122,8 +122,11 @@ void JNICALL OnVMInit(jvmtiEnv *jvmti, JNIEnv *jni_env, jthread thread) {
}

if (FLAGS_cprof_enable_heap_sampling) {
// TODO: Allow using the JVM's stack tracer with a flag once
// we can get the current context in a cloud build.
google::javaprofiler::HeapMonitor::Enable(
jvmti, jni_env, FLAGS_cprof_heap_sampling_interval);
jvmti, jni_env, FLAGS_cprof_heap_sampling_interval,
false /* use_jvm_trace */);
}

worker->Start(jni_env);
Expand All @@ -146,7 +149,7 @@ void JNICALL OnVMDeath(jvmtiEnv *jvmti_env, JNIEnv *jni_env) {
LOG(INFO) << "On VM death";
worker->Stop();
delete worker;
worker = NULL;
worker = nullptr;

if (google::javaprofiler::HeapMonitor::Enabled()) {
google::javaprofiler::HeapMonitor::Disable();
Expand Down Expand Up @@ -231,7 +234,7 @@ static bool RegisterJvmti(jvmtiEnv *jvmti) {
// Events are enumerated in jvmstatagent.h
for (int i = 0; i < events.size(); i++) {
JVMTI_ERROR_1(
(jvmti->SetEventNotificationMode(JVMTI_ENABLE, events[i], NULL)),
(jvmti->SetEventNotificationMode(JVMTI_ENABLE, events[i], nullptr)),
false);
}

Expand Down
Loading