From b610f1f0802186b3ed23dfd4d0d045cfaed271f0 Mon Sep 17 00:00:00 2001 From: jiangdayuan Date: Wed, 12 Jan 2022 10:41:29 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"!58=20=E6=96=B0=E5=A2=9E=E7=89=B9?= =?UTF-8?q?=E6=80=A7=EF=BC=9A=E5=BA=94=E7=94=A8=E5=90=AF=E5=8A=A8=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E5=92=8C=E7=BB=84=E4=BB=B6=E5=88=87=E6=8D=A2=E6=B5=81?= =?UTF-8?q?=E7=A8=8Btrace"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit a70132af38359d813b18624c28e0fa3dfbc6b532, reversing changes made to ef5d492915059e248cda8a48b8efd2c36cc976d3. Signed-off-by: jiangdayuan --- BUILD.gn | 1 - interfaces/innerkits/BUILD.gn | 5 +---- src/appspawn_msg_peer.cpp | 2 -- src/appspawn_server.cpp | 5 ----- src/socket/client_socket.cpp | 4 ---- test/unittest/app_spawn_msg_peer_test/BUILD.gn | 5 +---- test/unittest/app_spawn_server_test/BUILD.gn | 2 -- test/unittest/client_socket_test/BUILD.gn | 5 +---- 8 files changed, 3 insertions(+), 26 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 881a1805..d0e4d285 100755 --- a/BUILD.gn +++ b/BUILD.gn @@ -62,7 +62,6 @@ ohos_static_library("appspawn_server") { "//utils/native/base:utils", ] external_deps = [ - "bytrace_standard:bytrace_core", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/interfaces/innerkits/BUILD.gn b/interfaces/innerkits/BUILD.gn index e934a5f6..8e7b6ebd 100755 --- a/interfaces/innerkits/BUILD.gn +++ b/interfaces/innerkits/BUILD.gn @@ -27,10 +27,7 @@ ohos_static_library("appspawn_socket_client") { include_dirs = [ "${appspawn_path}/include" ] public_configs = [ ":exported_header_files" ] deps = [ "//utils/native/base:utils" ] - external_deps = [ - "bytrace_standard:bytrace_core", - "hiviewdfx_hilog_native:libhilog", - ] + external_deps = [ "hiviewdfx_hilog_native:libhilog" ] subsystem_name = "${subsystem_name}" part_name = "${part_name}" diff --git a/src/appspawn_msg_peer.cpp b/src/appspawn_msg_peer.cpp index 0ffd1fa5..57e3826b 100644 --- a/src/appspawn_msg_peer.cpp +++ b/src/appspawn_msg_peer.cpp @@ -17,7 +17,6 @@ #include -#include "bytrace.h" #include "hilog/log.h" #include "securec.h" @@ -49,7 +48,6 @@ int AppSpawnMsgPeer::GetConnectFd() const int AppSpawnMsgPeer::Response(pid_t pid) { - BYTRACE_NAME(BYTRACE_TAG_APP, __PRETTY_FUNCTION__); if ((socket_ == nullptr) || (connectFd_ < 0)) { HiLog::Error(LABEL, "Invalid socket params: connectFd %d", connectFd_); return -1; diff --git a/src/appspawn_server.cpp b/src/appspawn_server.cpp index f76db440..38ccf1e4 100644 --- a/src/appspawn_server.cpp +++ b/src/appspawn_server.cpp @@ -23,7 +23,6 @@ #include #include -#include "bytrace.h" #include "errors.h" #include "hilog/log.h" #include "main_thread.h" @@ -127,7 +126,6 @@ AppSpawnServer::AppSpawnServer(const std::string &socketName) void AppSpawnServer::MsgPeer(int connectFd) { - BYTRACE_NAME(BYTRACE_TAG_APP, __PRETTY_FUNCTION__); char err_string[ERR_STRING_SZ]; std::unique_ptr msgPeer = std::make_unique(socket_, connectFd); if (msgPeer == nullptr || msgPeer->MsgPeer() != 0) { @@ -154,7 +152,6 @@ void AppSpawnServer::ConnectionPeer() continue; } - BYTRACE_NAME(BYTRACE_TAG_APP, __PRETTY_FUNCTION__); mut_.lock(); // Ensure that mutex in SaveConnection is unlocked before being forked socket_->SaveConnection(connectFd); mut_.unlock(); @@ -191,7 +188,6 @@ bool AppSpawnServer::ServerMain(char *longProcName, int64_t longProcNameLen) dataCond_.wait(lock, [this] { return !this->appQueue_.empty(); }); std::unique_ptr msg = std::move(appQueue_.front()); appQueue_.pop(); - BYTRACE_NAME(BYTRACE_TAG_APP, __PRETTY_FUNCTION__); int connectFd = msg->GetConnectFd(); ClientSocket::AppProperty *appProperty = msg->GetMsg(); if (!CheckAppProperty(appProperty)) { @@ -216,7 +212,6 @@ bool AppSpawnServer::ServerMain(char *longProcName, int64_t longProcNameLen) msg->Response(-errno); continue; } else if (pid == 0) { - BYTRACE_NAME(BYTRACE_TAG_APP, "fork MainThread"); SpecialHandle(appProperty); SetAppProcProperty(connectFd, appProperty, longProcName, longProcNameLen, fd); _exit(0); diff --git a/src/socket/client_socket.cpp b/src/socket/client_socket.cpp index 52a8bed1..c39a0c95 100644 --- a/src/socket/client_socket.cpp +++ b/src/socket/client_socket.cpp @@ -19,7 +19,6 @@ #include #include -#include "bytrace.h" #include "hilog/log.h" #include "securec.h" @@ -59,7 +58,6 @@ void ClientSocket::CloseClient() int ClientSocket::ConnectSocket(int connectFd) { - BYTRACE_NAME(BYTRACE_TAG_APP, __PRETTY_FUNCTION__); char err_string[ERR_STRING_SZ]; if (connectFd < 0) { HiLog::Error(LABEL, "Client: Invalid socket fd: %d", connectFd); @@ -94,13 +92,11 @@ int ClientSocket::ConnectSocket() int ClientSocket::WriteSocketMessage(const void *buf, int len) { - BYTRACE_NAME(BYTRACE_TAG_APP, __PRETTY_FUNCTION__); return WriteSocketMessage(socketFd_, buf, len); } int ClientSocket::ReadSocketMessage(void *buf, int len) { - BYTRACE_NAME(BYTRACE_TAG_APP, __PRETTY_FUNCTION__); return ReadSocketMessage(socketFd_, buf, len); } } // namespace AppSpawn diff --git a/test/unittest/app_spawn_msg_peer_test/BUILD.gn b/test/unittest/app_spawn_msg_peer_test/BUILD.gn index 857f40ed..525b7f05 100644 --- a/test/unittest/app_spawn_msg_peer_test/BUILD.gn +++ b/test/unittest/app_spawn_msg_peer_test/BUILD.gn @@ -29,10 +29,7 @@ ohos_unittest("AppSpawnMsgPeerTest") { deps = [ "${appspawn_path}/test:appspawn_test_source" ] - external_deps = [ - "bytrace_standard:bytrace_core", - "hiviewdfx_hilog_native:libhilog", - ] + external_deps = [ "hiviewdfx_hilog_native:libhilog" ] } group("unittest") { diff --git a/test/unittest/app_spawn_server_test/BUILD.gn b/test/unittest/app_spawn_server_test/BUILD.gn index 9734cae0..4ac518e2 100755 --- a/test/unittest/app_spawn_server_test/BUILD.gn +++ b/test/unittest/app_spawn_server_test/BUILD.gn @@ -34,7 +34,6 @@ ohos_unittest("AppSpawnServerOverrideTest") { deps = [ "${appspawn_path}/test:appspawn_test_source" ] external_deps = [ - "bytrace_standard:bytrace_core", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] @@ -60,7 +59,6 @@ ohos_unittest("AppSpawnServerMockTest") { deps = [ "${appspawn_path}/test:appspawn_test_source" ] external_deps = [ - "bytrace_standard:bytrace_core", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/unittest/client_socket_test/BUILD.gn b/test/unittest/client_socket_test/BUILD.gn index 42e733d9..3b52e5af 100644 --- a/test/unittest/client_socket_test/BUILD.gn +++ b/test/unittest/client_socket_test/BUILD.gn @@ -30,10 +30,7 @@ ohos_unittest("ClientSocketTest") { deps = [ "${appspawn_path}/test:appspawn_test_source" ] - external_deps = [ - "bytrace_standard:bytrace_core", - "hiviewdfx_hilog_native:libhilog", - ] + external_deps = [ "hiviewdfx_hilog_native:libhilog" ] } group("unittest") { -- Gitee