diff options
author | 2023-05-16 10:32:54 +0000 | |
---|---|---|
committer | 2023-05-22 10:36:39 +0000 | |
commit | 78f3c72e8948087352788997a70854dee613352c (patch) | |
tree | 306db3c15bc4b7af149bcf3e07be533e50679b88 /tools/jvmti-agents/ti-alloc-sample | |
parent | dc771261232c2ff702373f396a5a7fe586e2f0a6 (diff) |
Use C++17's [[maybe_unused]] attribute in ART
Bug: 169680875
Test: mmm art
Change-Id: Ic0cc320891c42b07a2b5520a584d2b62052e7235
Diffstat (limited to 'tools/jvmti-agents/ti-alloc-sample')
-rw-r--r-- | tools/jvmti-agents/ti-alloc-sample/ti_alloc_sample.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/jvmti-agents/ti-alloc-sample/ti_alloc_sample.cc b/tools/jvmti-agents/ti-alloc-sample/ti_alloc_sample.cc index d719db5af8..1b359b8fb0 100644 --- a/tools/jvmti-agents/ti-alloc-sample/ti_alloc_sample.cc +++ b/tools/jvmti-agents/ti-alloc-sample/ti_alloc_sample.cc @@ -310,7 +310,7 @@ static int stack_depth_limit; static void JNICALL logVMObjectAlloc(jvmtiEnv* jvmti, JNIEnv* jni, jthread thread, - jobject obj ATTRIBUTE_UNUSED, + [[maybe_unused]] jobject obj, jclass klass, jlong size) { // Sample only once out of sampling_rate tries, and prevent recursive allocation tracking, @@ -407,9 +407,7 @@ static bool ProcessOptions(std::string options) { return true; } -static jint AgentStart(JavaVM* vm, - char* options, - void* reserved ATTRIBUTE_UNUSED) { +static jint AgentStart(JavaVM* vm, char* options, [[maybe_unused]] void* reserved) { // Handle the sampling rate, depth limit, and output path, if set. if (!ProcessOptions(options)) { return JNI_ERR; |