[enhancement](jni)append exception check for jni code. (#42507)#42945
[enhancement](jni)append exception check for jni code. (#42507)#42945morningman merged 1 commit intoapache:branch-2.1from
Conversation
Because in jni, we need to manually check for exceptions thrown, and if we do not handle the exception, the program will continue to execute, which is not like the try catch logic we often use. Therefore, in order to reduce the potential risks caused by not handling exceptions, I checked most of the jni code and added exception detection for it.
|
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
|
run buildall |
| << "Class java/lang/management/ManagementFactory Not Find.JVM monitoring fails."; | ||
| return; | ||
| } | ||
| Status JvmStats::init(JNIEnv* env) { |
There was a problem hiding this comment.
warning: function 'init' has cognitive complexity of 144 (threshold 50) [readability-function-cognitive-complexity]
Status JvmStats::init(JNIEnv* env) {
^Additional context
be/src/util/jvm_metrics.cpp:192: +1, including nesting penalty of 0, nesting level increased to 1
RETURN_IF_ERROR(JniUtil::GetGlobalClassRef(env, "java/lang/management/ManagementFactory",
^be/src/common/status.h:619: expanded from macro 'RETURN_IF_ERROR'
do { \
^be/src/util/jvm_metrics.cpp:192: +2, including nesting penalty of 1, nesting level increased to 2
RETURN_IF_ERROR(JniUtil::GetGlobalClassRef(env, "java/lang/management/ManagementFactory",
^be/src/common/status.h:621: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^be/src/util/jvm_metrics.cpp:195: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(, _getMemoryMXBeanMethod, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:195: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(, _getMemoryMXBeanMethod, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:199: +1, including nesting penalty of 0, nesting level increased to 1
RETURN_IF_ERROR(JniUtil::GetGlobalClassRef(env, "java/lang/management/MemoryUsage",
^be/src/common/status.h:619: expanded from macro 'RETURN_IF_ERROR'
do { \
^be/src/util/jvm_metrics.cpp:199: +2, including nesting penalty of 1, nesting level increased to 2
RETURN_IF_ERROR(JniUtil::GetGlobalClassRef(env, "java/lang/management/MemoryUsage",
^be/src/common/status.h:621: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^be/src/util/jvm_metrics.cpp:202: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(, _getMemoryUsageUsedMethod, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:202: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(, _getMemoryUsageUsedMethod, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:205: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(, _getMemoryUsageCommittedMethod, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:205: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(, _getMemoryUsageCommittedMethod, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:208: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(, _getMemoryUsageMaxMethod, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:208: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(, _getMemoryUsageMaxMethod, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:211: +1, including nesting penalty of 0, nesting level increased to 1
RETURN_IF_ERROR(JniUtil::GetGlobalClassRef(env, "java/lang/management/MemoryMXBean",
^be/src/common/status.h:619: expanded from macro 'RETURN_IF_ERROR'
do { \
^be/src/util/jvm_metrics.cpp:211: +2, including nesting penalty of 1, nesting level increased to 2
RETURN_IF_ERROR(JniUtil::GetGlobalClassRef(env, "java/lang/management/MemoryMXBean",
^be/src/common/status.h:621: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^be/src/util/jvm_metrics.cpp:214: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(, _getHeapMemoryUsageMethod, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:214: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(, _getHeapMemoryUsageMethod, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:217: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(, _getNonHeapMemoryUsageMethod, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:217: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(, _getNonHeapMemoryUsageMethod, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:221: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:221: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:226: +1, including nesting penalty of 0, nesting level increased to 1
RETURN_IF_ERROR(JniUtil::GetGlobalClassRef(env, "java/util/List", &_listClass));
^be/src/common/status.h:619: expanded from macro 'RETURN_IF_ERROR'
do { \
^be/src/util/jvm_metrics.cpp:226: +2, including nesting penalty of 1, nesting level increased to 2
RETURN_IF_ERROR(JniUtil::GetGlobalClassRef(env, "java/util/List", &_listClass));
^be/src/common/status.h:621: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^be/src/util/jvm_metrics.cpp:228: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(, _getListSizeMethod, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:228: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(, _getListSizeMethod, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:231: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(, _getListUseIndexMethod, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:231: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(, _getListUseIndexMethod, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:234: +1, including nesting penalty of 0, nesting level increased to 1
RETURN_IF_ERROR(JniUtil::GetGlobalClassRef(env, "java/lang/management/MemoryPoolMXBean",
^be/src/common/status.h:619: expanded from macro 'RETURN_IF_ERROR'
do { \
^be/src/util/jvm_metrics.cpp:234: +2, including nesting penalty of 1, nesting level increased to 2
RETURN_IF_ERROR(JniUtil::GetGlobalClassRef(env, "java/lang/management/MemoryPoolMXBean",
^be/src/common/status.h:621: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^be/src/util/jvm_metrics.cpp:237: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(, _getMemoryPoolMXBeanUsageMethod, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:237: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(, _getMemoryPoolMXBeanUsageMethod, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:241: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(, _getMemoryPollMXBeanPeakMethod, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:241: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(, _getMemoryPollMXBeanPeakMethod, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:244: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:244: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:248: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(, _getThreadMXBeanMethod, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:248: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(, _getThreadMXBeanMethod, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:252: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:252: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:257: +1, including nesting penalty of 0, nesting level increased to 1
RETURN_IF_ERROR(JniUtil::GetGlobalClassRef(env, "java/lang/management/GarbageCollectorMXBean",
^be/src/common/status.h:619: expanded from macro 'RETURN_IF_ERROR'
do { \
^be/src/util/jvm_metrics.cpp:257: +2, including nesting penalty of 1, nesting level increased to 2
RETURN_IF_ERROR(JniUtil::GetGlobalClassRef(env, "java/lang/management/GarbageCollectorMXBean",
^be/src/common/status.h:621: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^be/src/util/jvm_metrics.cpp:260: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:260: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:264: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:264: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:268: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:268: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:272: +1, including nesting penalty of 0, nesting level increased to 1
RETURN_IF_ERROR(JniUtil::GetGlobalClassRef(env, "java/lang/management/ThreadMXBean",
^be/src/common/status.h:619: expanded from macro 'RETURN_IF_ERROR'
do { \
^be/src/util/jvm_metrics.cpp:272: +2, including nesting penalty of 1, nesting level increased to 2
RETURN_IF_ERROR(JniUtil::GetGlobalClassRef(env, "java/lang/management/ThreadMXBean",
^be/src/common/status.h:621: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^be/src/util/jvm_metrics.cpp:275: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:275: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:280: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:280: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:286: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:286: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:291: +1, including nesting penalty of 0, nesting level increased to 1
RETURN_IF_ERROR(
^be/src/common/status.h:619: expanded from macro 'RETURN_IF_ERROR'
do { \
^be/src/util/jvm_metrics.cpp:291: +2, including nesting penalty of 1, nesting level increased to 2
RETURN_IF_ERROR(
^be/src/common/status.h:621: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^be/src/util/jvm_metrics.cpp:294: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:294: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:300: +1, including nesting penalty of 0, nesting level increased to 1
RETURN_IF_ERROR(JniUtil::GetGlobalClassRef(env, "java/lang/Thread$State", &_threadStateClass));
^be/src/common/status.h:619: expanded from macro 'RETURN_IF_ERROR'
do { \
^be/src/util/jvm_metrics.cpp:300: +2, including nesting penalty of 1, nesting level increased to 2
RETURN_IF_ERROR(JniUtil::GetGlobalClassRef(env, "java/lang/Thread$State", &_threadStateClass));
^be/src/common/status.h:621: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^be/src/util/jvm_metrics.cpp:302: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:302: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:306: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:306: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:310: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:310: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:313: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:313: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:317: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:317: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:320: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:320: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:324: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(jobject, newThreadStateObj, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:324: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(jobject, newThreadStateObj, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:326: +1, including nesting penalty of 0, nesting level increased to 1
RETURN_IF_ERROR(JniUtil::LocalToGlobalRef(env, newThreadStateObj, &_newThreadStateObj));
^be/src/common/status.h:619: expanded from macro 'RETURN_IF_ERROR'
do { \
^be/src/util/jvm_metrics.cpp:326: +2, including nesting penalty of 1, nesting level increased to 2
RETURN_IF_ERROR(JniUtil::LocalToGlobalRef(env, newThreadStateObj, &_newThreadStateObj));
^be/src/common/status.h:621: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^be/src/util/jvm_metrics.cpp:328: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(jobject, runnableThreadStateObj, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:328: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(jobject, runnableThreadStateObj, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:330: +1, including nesting penalty of 0, nesting level increased to 1
RETURN_IF_ERROR(
^be/src/common/status.h:619: expanded from macro 'RETURN_IF_ERROR'
do { \
^be/src/util/jvm_metrics.cpp:330: +2, including nesting penalty of 1, nesting level increased to 2
RETURN_IF_ERROR(
^be/src/common/status.h:621: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^be/src/util/jvm_metrics.cpp:333: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(jobject, blockedThreadStateObj, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:333: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(jobject, blockedThreadStateObj, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:335: +1, including nesting penalty of 0, nesting level increased to 1
RETURN_IF_ERROR(JniUtil::LocalToGlobalRef(env, blockedThreadStateObj, &_blockedThreadStateObj));
^be/src/common/status.h:619: expanded from macro 'RETURN_IF_ERROR'
do { \
^be/src/util/jvm_metrics.cpp:335: +2, including nesting penalty of 1, nesting level increased to 2
RETURN_IF_ERROR(JniUtil::LocalToGlobalRef(env, blockedThreadStateObj, &_blockedThreadStateObj));
^be/src/common/status.h:621: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^be/src/util/jvm_metrics.cpp:337: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(jobject, waitingThreadStateObj, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:337: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(jobject, waitingThreadStateObj, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:339: +1, including nesting penalty of 0, nesting level increased to 1
RETURN_IF_ERROR(JniUtil::LocalToGlobalRef(env, waitingThreadStateObj, &_waitingThreadStateObj));
^be/src/common/status.h:619: expanded from macro 'RETURN_IF_ERROR'
do { \
^be/src/util/jvm_metrics.cpp:339: +2, including nesting penalty of 1, nesting level increased to 2
RETURN_IF_ERROR(JniUtil::LocalToGlobalRef(env, waitingThreadStateObj, &_waitingThreadStateObj));
^be/src/common/status.h:621: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^be/src/util/jvm_metrics.cpp:341: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:341: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:344: +1, including nesting penalty of 0, nesting level increased to 1
RETURN_IF_ERROR(JniUtil::LocalToGlobalRef(env, timedWaitingThreadStateObj,
^be/src/common/status.h:619: expanded from macro 'RETURN_IF_ERROR'
do { \
^be/src/util/jvm_metrics.cpp:344: +2, including nesting penalty of 1, nesting level increased to 2
RETURN_IF_ERROR(JniUtil::LocalToGlobalRef(env, timedWaitingThreadStateObj,
^be/src/common/status.h:621: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^be/src/util/jvm_metrics.cpp:347: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:347: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:350: +1, including nesting penalty of 0, nesting level increased to 1
RETURN_IF_ERROR(
^be/src/common/status.h:619: expanded from macro 'RETURN_IF_ERROR'
do { \
^be/src/util/jvm_metrics.cpp:350: +2, including nesting penalty of 1, nesting level increased to 2
RETURN_IF_ERROR(
^be/src/common/status.h:621: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^| << "Class java/lang/management/ManagementFactory Not Find.JVM monitoring fails."; | ||
| return; | ||
| } | ||
| Status JvmStats::init(JNIEnv* env) { |
There was a problem hiding this comment.
warning: function 'init' exceeds recommended size/complexity thresholds [readability-function-size]
Status JvmStats::init(JNIEnv* env) {
^Additional context
be/src/util/jvm_metrics.cpp:191: 166 lines including whitespace and comments (threshold 80)
Status JvmStats::init(JNIEnv* env) {
^| } | ||
|
|
||
| void JvmStats::refresh(JvmMetrics* jvm_metrics) { | ||
| Status JvmStats::refresh(JvmMetrics* jvm_metrics) const { |
There was a problem hiding this comment.
warning: function 'refresh' has cognitive complexity of 184 (threshold 50) [readability-function-cognitive-complexity]
Status JvmStats::refresh(JvmMetrics* jvm_metrics) const {
^Additional context
be/src/util/jvm_metrics.cpp:360: +1, including nesting penalty of 0, nesting level increased to 1
if (!_init_complete) {
^be/src/util/jvm_metrics.cpp:365: +1, including nesting penalty of 0, nesting level increased to 1
RETURN_IF_ERROR(JniUtil::GetJNIEnv(&env));
^be/src/common/status.h:619: expanded from macro 'RETURN_IF_ERROR'
do { \
^be/src/util/jvm_metrics.cpp:365: +2, including nesting penalty of 1, nesting level increased to 2
RETURN_IF_ERROR(JniUtil::GetJNIEnv(&env));
^be/src/common/status.h:621: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^be/src/util/jvm_metrics.cpp:367: nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:48: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
DEFER(env->DeleteLocalRef(result)); \
^be/src/util/defer_op.h:45: expanded from macro 'DEFER'
#define DEFER(...) DEFER_FWD(__LINE__, __VA_ARGS__)
^be/src/util/defer_op.h:44: expanded from macro 'DEFER_FWD'
#define DEFER_FWD(n, ...) DEFER_CONCAT(n, __VA_ARGS__)
^be/src/util/defer_op.h:43: expanded from macro 'DEFER_CONCAT'
#define DEFER_CONCAT(n, ...) const auto defer##n = doris::Defer([&]() { __VA_ARGS__; })
^be/src/util/jvm_metrics.cpp:367: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:49: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:367: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:49: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:371: nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:48: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
DEFER(env->DeleteLocalRef(result)); \
^be/src/util/defer_op.h:45: expanded from macro 'DEFER'
#define DEFER(...) DEFER_FWD(__LINE__, __VA_ARGS__)
^be/src/util/defer_op.h:44: expanded from macro 'DEFER_FWD'
#define DEFER_FWD(n, ...) DEFER_CONCAT(n, __VA_ARGS__)
^be/src/util/defer_op.h:43: expanded from macro 'DEFER_CONCAT'
#define DEFER_CONCAT(n, ...) const auto defer##n = doris::Defer([&]() { __VA_ARGS__; })
^be/src/util/jvm_metrics.cpp:371: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:49: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:371: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:49: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:375: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(jlong, heapMemoryUsed, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:375: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(jlong, heapMemoryUsed, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:378: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:378: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:382: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(jlong, heapMemoryMax, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:382: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(jlong, heapMemoryMax, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:385: +1, including nesting penalty of 0, nesting level increased to 1
jvm_metrics->jvm_heap_size_bytes_used->set_value(heapMemoryUsed < 0 ? 0 : heapMemoryUsed);
^be/src/util/jvm_metrics.cpp:387: +1, including nesting penalty of 0, nesting level increased to 1
heapMemoryCommitted < 0 ? 0 : heapMemoryCommitted);
^be/src/util/jvm_metrics.cpp:388: +1, including nesting penalty of 0, nesting level increased to 1
jvm_metrics->jvm_heap_size_bytes_max->set_value(heapMemoryMax < 0 ? 0 : heapMemoryMax);
^be/src/util/jvm_metrics.cpp:390: nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:48: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
DEFER(env->DeleteLocalRef(result)); \
^be/src/util/defer_op.h:45: expanded from macro 'DEFER'
#define DEFER(...) DEFER_FWD(__LINE__, __VA_ARGS__)
^be/src/util/defer_op.h:44: expanded from macro 'DEFER_FWD'
#define DEFER_FWD(n, ...) DEFER_CONCAT(n, __VA_ARGS__)
^be/src/util/defer_op.h:43: expanded from macro 'DEFER_CONCAT'
#define DEFER_CONCAT(n, ...) const auto defer##n = doris::Defer([&]() { __VA_ARGS__; })
^be/src/util/jvm_metrics.cpp:390: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:49: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:390: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:49: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:394: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:394: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:398: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:398: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:403: +1, including nesting penalty of 0, nesting level increased to 1
nonHeapMemoryCommitted < 0 ? 0 : nonHeapMemoryCommitted);
^be/src/util/jvm_metrics.cpp:404: +1, including nesting penalty of 0, nesting level increased to 1
jvm_metrics->jvm_non_heap_size_bytes_used->set_value(nonHeapMemoryUsed < 0 ? 0
^be/src/util/jvm_metrics.cpp:407: nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:48: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
DEFER(env->DeleteLocalRef(result)); \
^be/src/util/defer_op.h:45: expanded from macro 'DEFER'
#define DEFER(...) DEFER_FWD(__LINE__, __VA_ARGS__)
^be/src/util/defer_op.h:44: expanded from macro 'DEFER_FWD'
#define DEFER_FWD(n, ...) DEFER_CONCAT(n, __VA_ARGS__)
^be/src/util/defer_op.h:43: expanded from macro 'DEFER_CONCAT'
#define DEFER_CONCAT(n, ...) const auto defer##n = doris::Defer([&]() { __VA_ARGS__; })
^be/src/util/jvm_metrics.cpp:407: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:49: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:407: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:49: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:411: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(jint, size, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:411: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(jint, size, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:414: +1, including nesting penalty of 0, nesting level increased to 1
for (int i = 0; i < size; ++i) {
^be/src/util/jvm_metrics.cpp:415: nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:48: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
DEFER(env->DeleteLocalRef(result)); \
^be/src/util/defer_op.h:45: expanded from macro 'DEFER'
#define DEFER(...) DEFER_FWD(__LINE__, __VA_ARGS__)
^be/src/util/defer_op.h:44: expanded from macro 'DEFER_FWD'
#define DEFER_FWD(n, ...) DEFER_CONCAT(n, __VA_ARGS__)
^be/src/util/defer_op.h:43: expanded from macro 'DEFER_CONCAT'
#define DEFER_CONCAT(n, ...) const auto defer##n = doris::Defer([&]() { __VA_ARGS__; })
^be/src/util/jvm_metrics.cpp:415: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:49: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:415: +3, including nesting penalty of 2, nesting level increased to 3
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:49: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:419: nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:48: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
DEFER(env->DeleteLocalRef(result)); \
^be/src/util/defer_op.h:45: expanded from macro 'DEFER'
#define DEFER(...) DEFER_FWD(__LINE__, __VA_ARGS__)
^be/src/util/defer_op.h:44: expanded from macro 'DEFER_FWD'
#define DEFER_FWD(n, ...) DEFER_CONCAT(n, __VA_ARGS__)
^be/src/util/defer_op.h:43: expanded from macro 'DEFER_CONCAT'
#define DEFER_CONCAT(n, ...) const auto defer##n = doris::Defer([&]() { __VA_ARGS__; })
^be/src/util/jvm_metrics.cpp:419: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:49: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:419: +3, including nesting penalty of 2, nesting level increased to 3
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:49: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:423: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(jlong, used, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:423: +3, including nesting penalty of 2, nesting level increased to 3
JNI_CALL_METHOD_CHECK_EXCEPTION(jlong, used, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:426: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(jlong, max, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:426: +3, including nesting penalty of 2, nesting level increased to 3
JNI_CALL_METHOD_CHECK_EXCEPTION(jlong, max, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:429: nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:48: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
DEFER(env->DeleteLocalRef(result)); \
^be/src/util/defer_op.h:45: expanded from macro 'DEFER'
#define DEFER(...) DEFER_FWD(__LINE__, __VA_ARGS__)
^be/src/util/defer_op.h:44: expanded from macro 'DEFER_FWD'
#define DEFER_FWD(n, ...) DEFER_CONCAT(n, __VA_ARGS__)
^be/src/util/defer_op.h:43: expanded from macro 'DEFER_CONCAT'
#define DEFER_CONCAT(n, ...) const auto defer##n = doris::Defer([&]() { __VA_ARGS__; })
^be/src/util/jvm_metrics.cpp:429: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:49: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:429: +3, including nesting penalty of 2, nesting level increased to 3
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:49: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:433: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(jlong, peakUsed, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:433: +3, including nesting penalty of 2, nesting level increased to 3
JNI_CALL_METHOD_CHECK_EXCEPTION(jlong, peakUsed, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:436: nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:48: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
DEFER(env->DeleteLocalRef(result)); \
^be/src/util/defer_op.h:45: expanded from macro 'DEFER'
#define DEFER(...) DEFER_FWD(__LINE__, __VA_ARGS__)
^be/src/util/defer_op.h:44: expanded from macro 'DEFER_FWD'
#define DEFER_FWD(n, ...) DEFER_CONCAT(n, __VA_ARGS__)
^be/src/util/defer_op.h:43: expanded from macro 'DEFER_CONCAT'
#define DEFER_CONCAT(n, ...) const auto defer##n = doris::Defer([&]() { __VA_ARGS__; })
^be/src/util/jvm_metrics.cpp:436: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:49: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:436: +3, including nesting penalty of 2, nesting level increased to 3
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:49: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:442: +2, including nesting penalty of 1, nesting level increased to 2
if (nameStr != nullptr) {
^be/src/util/jvm_metrics.cpp:444: +3, including nesting penalty of 2, nesting level increased to 3
if (it == _memoryPoolName.end()) {
^be/src/util/jvm_metrics.cpp:447: +3, including nesting penalty of 2, nesting level increased to 3
if (it->second == memoryPoolNameEnum::YOUNG) {
^be/src/util/jvm_metrics.cpp:448: +4, including nesting penalty of 3, nesting level increased to 4
jvm_metrics->jvm_young_size_bytes_used->set_value(used < 0 ? 0 : used);
^be/src/util/jvm_metrics.cpp:449: +4, including nesting penalty of 3, nesting level increased to 4
jvm_metrics->jvm_young_size_bytes_peak_used->set_value(peakUsed < 0 ? 0 : peakUsed);
^be/src/util/jvm_metrics.cpp:450: +4, including nesting penalty of 3, nesting level increased to 4
jvm_metrics->jvm_young_size_bytes_max->set_value(max < 0 ? 0 : max);
^be/src/util/jvm_metrics.cpp:452: +1, nesting level increased to 3
} else if (it->second == memoryPoolNameEnum::OLD) {
^be/src/util/jvm_metrics.cpp:453: +4, including nesting penalty of 3, nesting level increased to 4
jvm_metrics->jvm_old_size_bytes_used->set_value(used < 0 ? 0 : used);
^be/src/util/jvm_metrics.cpp:454: +4, including nesting penalty of 3, nesting level increased to 4
jvm_metrics->jvm_old_size_bytes_peak_used->set_value(peakUsed < 0 ? 0 : peakUsed);
^be/src/util/jvm_metrics.cpp:455: +4, including nesting penalty of 3, nesting level increased to 4
jvm_metrics->jvm_old_size_bytes_max->set_value(max < 0 ? 0 : max);
^be/src/util/jvm_metrics.cpp:462: nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:48: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
DEFER(env->DeleteLocalRef(result)); \
^be/src/util/defer_op.h:45: expanded from macro 'DEFER'
#define DEFER(...) DEFER_FWD(__LINE__, __VA_ARGS__)
^be/src/util/defer_op.h:44: expanded from macro 'DEFER_FWD'
#define DEFER_FWD(n, ...) DEFER_CONCAT(n, __VA_ARGS__)
^be/src/util/defer_op.h:43: expanded from macro 'DEFER_CONCAT'
#define DEFER_CONCAT(n, ...) const auto defer##n = doris::Defer([&]() { __VA_ARGS__; })
^be/src/util/jvm_metrics.cpp:462: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:49: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:462: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:49: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:466: nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:48: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
DEFER(env->DeleteLocalRef(result)); \
^be/src/util/defer_op.h:45: expanded from macro 'DEFER'
#define DEFER(...) DEFER_FWD(__LINE__, __VA_ARGS__)
^be/src/util/defer_op.h:44: expanded from macro 'DEFER_FWD'
#define DEFER_FWD(n, ...) DEFER_CONCAT(n, __VA_ARGS__)
^be/src/util/defer_op.h:43: expanded from macro 'DEFER_CONCAT'
#define DEFER_CONCAT(n, ...) const auto defer##n = doris::Defer([&]() { __VA_ARGS__; })
^be/src/util/jvm_metrics.cpp:466: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:49: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:466: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:49: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:471: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(jint, threadCount, env, GetArrayLength(threadIds));
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:471: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(jint, threadCount, env, GetArrayLength(threadIds));
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:473: nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:48: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
DEFER(env->DeleteLocalRef(result)); \
^be/src/util/defer_op.h:45: expanded from macro 'DEFER'
#define DEFER(...) DEFER_FWD(__LINE__, __VA_ARGS__)
^be/src/util/defer_op.h:44: expanded from macro 'DEFER_FWD'
#define DEFER_FWD(n, ...) DEFER_CONCAT(n, __VA_ARGS__)
^be/src/util/defer_op.h:43: expanded from macro 'DEFER_CONCAT'
#define DEFER_CONCAT(n, ...) const auto defer##n = doris::Defer([&]() { __VA_ARGS__; })
^be/src/util/jvm_metrics.cpp:473: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:49: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:473: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:49: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:480: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(jint, peakThreadCount, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:480: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(jint, peakThreadCount, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:483: +1, including nesting penalty of 0, nesting level increased to 1
jvm_metrics->jvm_thread_peak_count->set_value(peakThreadCount < 0 ? 0 : peakThreadCount);
^be/src/util/jvm_metrics.cpp:484: +1, including nesting penalty of 0, nesting level increased to 1
jvm_metrics->jvm_thread_count->set_value(threadCount < 0 ? 0 : threadCount);
^be/src/util/jvm_metrics.cpp:486: +1, including nesting penalty of 0, nesting level increased to 1
for (int i = 0; i < threadCount; i++) {
^be/src/util/jvm_metrics.cpp:487: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(jobject, threadInfo, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:487: +3, including nesting penalty of 2, nesting level increased to 3
JNI_CALL_METHOD_CHECK_EXCEPTION(jobject, threadInfo, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:490: +2, including nesting penalty of 1, nesting level increased to 2
if (threadInfo == nullptr) {
^be/src/util/jvm_metrics.cpp:494: nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:48: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
DEFER(env->DeleteLocalRef(result)); \
^be/src/util/defer_op.h:45: expanded from macro 'DEFER'
#define DEFER(...) DEFER_FWD(__LINE__, __VA_ARGS__)
^be/src/util/defer_op.h:44: expanded from macro 'DEFER_FWD'
#define DEFER_FWD(n, ...) DEFER_CONCAT(n, __VA_ARGS__)
^be/src/util/defer_op.h:43: expanded from macro 'DEFER_CONCAT'
#define DEFER_CONCAT(n, ...) const auto defer##n = doris::Defer([&]() { __VA_ARGS__; })
^be/src/util/jvm_metrics.cpp:494: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:49: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:494: +3, including nesting penalty of 2, nesting level increased to 3
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:49: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:498: +2, including nesting penalty of 1, nesting level increased to 2
if (env->IsSameObject(threadState, _newThreadStateObj)) {
^be/src/util/jvm_metrics.cpp:500: +1, nesting level increased to 2
} else if (env->IsSameObject(threadState, _runnableThreadStateObj)) {
^be/src/util/jvm_metrics.cpp:502: +1, nesting level increased to 2
} else if (env->IsSameObject(threadState, _blockedThreadStateObj)) {
^be/src/util/jvm_metrics.cpp:504: +1, nesting level increased to 2
} else if (env->IsSameObject(threadState, _waitingThreadStateObj)) {
^be/src/util/jvm_metrics.cpp:506: +1, nesting level increased to 2
} else if (env->IsSameObject(threadState, _timedWaitingThreadStateObj)) {
^be/src/util/jvm_metrics.cpp:508: +1, nesting level increased to 2
} else if (env->IsSameObject(threadState, _terminatedThreadStateObj)) {
^be/src/util/jvm_metrics.cpp:513: +1, including nesting penalty of 0, nesting level increased to 1
jvm_metrics->jvm_thread_new_count->set_value(threadsNew < 0 ? 0 : threadsNew);
^be/src/util/jvm_metrics.cpp:514: +1, including nesting penalty of 0, nesting level increased to 1
jvm_metrics->jvm_thread_runnable_count->set_value(threadsRunnable < 0 ? 0 : threadsRunnable);
^be/src/util/jvm_metrics.cpp:515: +1, including nesting penalty of 0, nesting level increased to 1
jvm_metrics->jvm_thread_blocked_count->set_value(threadsBlocked < 0 ? 0 : threadsBlocked);
^be/src/util/jvm_metrics.cpp:516: +1, including nesting penalty of 0, nesting level increased to 1
jvm_metrics->jvm_thread_waiting_count->set_value(threadsWaiting < 0 ? 0 : threadsWaiting);
^be/src/util/jvm_metrics.cpp:518: +1, including nesting penalty of 0, nesting level increased to 1
threadsTimedWaiting < 0 ? 0 : threadsTimedWaiting);
^be/src/util/jvm_metrics.cpp:519: +1, including nesting penalty of 0, nesting level increased to 1
jvm_metrics->jvm_thread_terminated_count->set_value(threadsTerminated < 0 ? 0
^be/src/util/jvm_metrics.cpp:522: nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:48: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
DEFER(env->DeleteLocalRef(result)); \
^be/src/util/defer_op.h:45: expanded from macro 'DEFER'
#define DEFER(...) DEFER_FWD(__LINE__, __VA_ARGS__)
^be/src/util/defer_op.h:44: expanded from macro 'DEFER_FWD'
#define DEFER_FWD(n, ...) DEFER_CONCAT(n, __VA_ARGS__)
^be/src/util/defer_op.h:43: expanded from macro 'DEFER_CONCAT'
#define DEFER_CONCAT(n, ...) const auto defer##n = doris::Defer([&]() { __VA_ARGS__; })
^be/src/util/jvm_metrics.cpp:522: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:49: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:522: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:49: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:526: +1, including nesting penalty of 0, nesting level increased to 1
JNI_CALL_METHOD_CHECK_EXCEPTION(jint, numCollectors, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:526: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(jint, numCollectors, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:529: +1, including nesting penalty of 0, nesting level increased to 1
for (int i = 0; i < numCollectors; i++) {
^be/src/util/jvm_metrics.cpp:530: nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:48: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
DEFER(env->DeleteLocalRef(result)); \
^be/src/util/defer_op.h:45: expanded from macro 'DEFER'
#define DEFER(...) DEFER_FWD(__LINE__, __VA_ARGS__)
^be/src/util/defer_op.h:44: expanded from macro 'DEFER_FWD'
#define DEFER_FWD(n, ...) DEFER_CONCAT(n, __VA_ARGS__)
^be/src/util/defer_op.h:43: expanded from macro 'DEFER_CONCAT'
#define DEFER_CONCAT(n, ...) const auto defer##n = doris::Defer([&]() { __VA_ARGS__; })
^be/src/util/jvm_metrics.cpp:530: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:49: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:530: +3, including nesting penalty of 2, nesting level increased to 3
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
^be/src/util/jni-util.h:49: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:533: nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(jobject, gcName, env,
^be/src/util/jni-util.h:48: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
DEFER(env->DeleteLocalRef(result)); \
^be/src/util/defer_op.h:45: expanded from macro 'DEFER'
#define DEFER(...) DEFER_FWD(__LINE__, __VA_ARGS__)
^be/src/util/defer_op.h:44: expanded from macro 'DEFER_FWD'
#define DEFER_FWD(n, ...) DEFER_CONCAT(n, __VA_ARGS__)
^be/src/util/defer_op.h:43: expanded from macro 'DEFER_CONCAT'
#define DEFER_CONCAT(n, ...) const auto defer##n = doris::Defer([&]() { __VA_ARGS__; })
^be/src/util/jvm_metrics.cpp:533: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(jobject, gcName, env,
^be/src/util/jni-util.h:49: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:533: +3, including nesting penalty of 2, nesting level increased to 3
JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(jobject, gcName, env,
^be/src/util/jni-util.h:49: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:536: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(jlong, gcCollectionCount, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:536: +3, including nesting penalty of 2, nesting level increased to 3
JNI_CALL_METHOD_CHECK_EXCEPTION(jlong, gcCollectionCount, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:539: +2, including nesting penalty of 1, nesting level increased to 2
JNI_CALL_METHOD_CHECK_EXCEPTION(jlong, gcCollectionTime, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:41: expanded from macro 'RETURN_ERROR_IF_EXC'
do { \
^be/src/util/jvm_metrics.cpp:539: +3, including nesting penalty of 2, nesting level increased to 3
JNI_CALL_METHOD_CHECK_EXCEPTION(jlong, gcCollectionTime, env,
^be/src/util/jni-util.h:53: expanded from macro 'JNI_CALL_METHOD_CHECK_EXCEPTION'
RETURN_ERROR_IF_EXC(env)
^be/src/util/jni-util.h:42: expanded from macro 'RETURN_ERROR_IF_EXC'
if (env->ExceptionCheck()) [[unlikely]] \
^be/src/util/jvm_metrics.cpp:543: +2, including nesting penalty of 1, nesting level increased to 2
if (gcNameStr != nullptr) {
^be/src/util/jvm_metrics.cpp:544: +3, including nesting penalty of 2, nesting level increased to 3
if (strcmp(gcNameStr, "G1 Young Generation") == 0) {
^be/src/util/jvm_metrics.cpp:548: +1, nesting level increased to 3
} else {
^| } | ||
|
|
||
| void JvmStats::refresh(JvmMetrics* jvm_metrics) { | ||
| Status JvmStats::refresh(JvmMetrics* jvm_metrics) const { |
There was a problem hiding this comment.
warning: function 'refresh' exceeds recommended size/complexity thresholds [readability-function-size]
Status JvmStats::refresh(JvmMetrics* jvm_metrics) const {
^Additional context
be/src/util/jvm_metrics.cpp:359: 199 lines including whitespace and comments (threshold 80)
Status JvmStats::refresh(JvmMetrics* jvm_metrics) const {
^|
TeamCity be ut coverage result: |
bp #42507