Browse Source

Profiling AR version11

tags/v1.2.0
taoxiangdong 4 years ago
parent
commit
77ff5be0a0
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      ge/common/profiling/profiling_manager.cc

+ 2
- 3
ge/common/profiling/profiling_manager.cc View File

@@ -60,7 +60,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY ge::Status ProfilingManager::In
subscribe_count_ = 0;
GELOGI("ProfilingManager::Init job_id:%s", options.job_id.c_str());

struct MsprofGeOptions prof_conf = { 0 };
struct MsprofGeOptions prof_conf = {{ 0 }};
Status ret = InitFromOptions(options, prof_conf);
if (ret != SUCCESS) {
GELOGE(ret, "Failed to init profiling.");
@@ -108,8 +108,7 @@ ge::Status ProfilingManager::InitFromOptions(const Options &options, MsprofGeOpt
(void)mmGetEnv("PROFILING_MODE", env_profiling_mode, MMPA_MAX_PATH);
(void)mmGetEnv("PROFILING_OPTIONS", prof_conf.options, MSPROF_OPTIONS_DEF_LEN_MAX);
// The env is invalid
if ((env_profiling_mode == nullptr) || (strcmp("true", env_profiling_mode) != 0)
|| (strcmp(prof_conf.options, "\0") == 0)) {
if ((strcmp("true", env_profiling_mode) != 0) || (strcmp(prof_conf.options, "\0") == 0)) {
return SUCCESS;
}
// enable profiling by env


Loading…
Cancel
Save