From f7c45d81140f1bcdceb011219454ce724cbae23e Mon Sep 17 00:00:00 2001 From: zhangxiaokun Date: Fri, 9 Jul 2021 19:28:05 +0800 Subject: [PATCH 1/2] mmSetCurrentThreadName --- ge/graph/execute/model_executor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ge/graph/execute/model_executor.cc b/ge/graph/execute/model_executor.cc index bcbc08e6..2fc7b0af 100644 --- a/ge/graph/execute/model_executor.cc +++ b/ge/graph/execute/model_executor.cc @@ -193,7 +193,7 @@ Status ModelExecutor::PushGraph(const RunArgs &args) { void ModelExecutor::RunThread() { ErrorManager::GetInstance().SetStage(error_message::kModelExecute, error_message::kModelExecute); - if (prctl(PR_SET_NAME, ("GE_Run")) != 0) { + if (mmSetCurrentThreadName("GE_Run") != EN_OK) { GELOGW("Set thread name failed."); } From 8aa46479fa227ab9e4b4044a35e26bd6edd0d64f Mon Sep 17 00:00:00 2001 From: zhangxiaokun Date: Fri, 9 Jul 2021 19:44:18 +0800 Subject: [PATCH 2/2] mmSetCurrentThreadName stub --- tests/depends/mmpa/src/mmpa_stub.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/depends/mmpa/src/mmpa_stub.cc b/tests/depends/mmpa/src/mmpa_stub.cc index b0f1fb87..8801aacd 100644 --- a/tests/depends/mmpa/src/mmpa_stub.cc +++ b/tests/depends/mmpa/src/mmpa_stub.cc @@ -381,3 +381,8 @@ INT32 mmGetPid() { return (INT32)getpid(); } + +INT32 mmSetCurrentThreadName(const CHAR *name) +{ + return EN_OK; +} \ No newline at end of file