dfx add hitrace for distributed_screen

Signed-off-by: qinlong0101 <qinlong15@huawei.com>
This commit is contained in:
qinlong0101
2022-05-16 10:23:18 +08:00
parent c01fac61d5
commit 20942b7db9
6 changed files with 40 additions and 48 deletions
+23 -25
View File
@@ -17,34 +17,32 @@ import(
"//foundation/distributedhardware/distributedscreen/distributedscreen.gni")
ohos_shared_library("distributed_screen_utils") {
include_dirs = [
"//utils/native/base/include",
"include",
"//base/hiviewdfx/hitrace/interfaces/native/innerkits/include/hitrace_meter",
]
include_dirs = [
"//utils/native/base/include",
"include",
"//base/hiviewdfx/hitrace/interfaces/native/innerkits/include/hitrace_meter",
]
sources = [
"src/dscreen_util.cpp",
"src/dscreen_log.cpp",
]
sources = [
"src/dscreen_log.cpp",
"src/dscreen_util.cpp",
]
deps = [
"//utils/native/base:utils",
]
deps = [ "//utils/native/base:utils" ]
external_deps = [
"dsoftbus_standard:softbus_client",
"hiviewdfx_hilog_native:libhilog",
"hitrace_native:hitrace_meter",
]
external_deps = [
"dsoftbus_standard:softbus_client",
"hitrace_native:hitrace_meter",
"hiviewdfx_hilog_native:libhilog",
]
defines = [
"HI_LOG_ENABLE",
"DH_LOG_TAG=\"dscreenutil\"",
"LOG_DOMAIN=0xD004100",
]
defines = [
"HI_LOG_ENABLE",
"DH_LOG_TAG=\"dscreenutil\"",
"LOG_DOMAIN=0xD004100",
]
subsystem_name = "distributedhardware"
subsystem_name = "distributedhardware"
part_name = "distributed_screen"
}
part_name = "distributed_screen"
}
+13 -19
View File
@@ -18,42 +18,36 @@
#include <string>
// #include "bytrace.h"
#include "hitrace_meter.h"
namespace OHOS {
namespace DistributedHardware {
//SourceHandler_samgr
constexpr uint64_t DSCREEN_SOURCE_LOAD_SYSTEM_ABILITY_LABEL = BYTRACE_TAG_SCREEN;
const std::string DSCREEN_SOURCE_LOAD_SYSTEM_ABILITY_START = "DSCREEN_SOURCE_LOAD_SYSTEM_ABILITY_START";
//SinkHandler_samgr
constexpr uint64_t DSCREEN_SINK_LOAD_SYSTEM_ABILITY_LABEL = BYTRACE_TAG_SCREEN;
const std::string DSCREEN_SINK_LOAD_SYSTEM_ABILITY_START = "DSCREEN_SINK_LOAD_SYSTEM_ABILITY_START";
//SourceTrans_opensession/CloseSession/ReleaseSession
constexpr uint64_t DSCREEN_SOURCE_OPEN_SESSION_LABEL = BYTRACE_TAG_SCREEN;
const std::string DSCREEN_SOURCE_OPEN_SESSION_START = "DSCREEN_SOURCE_OPEN_SESSION_START";
constexpr uint64_t DSCREEN_SOURCE_CLOSE_SESSION_LABEL = BYTRACE_TAG_SCREEN;
const std::string DSCREEN_SOURCE_CLOSE_SESSION_START = "DSCREEN_SOURCE_CLOSE_SESSION_START";
constexpr uint64_t DSCREEN_SOURCE_RELEASE_SESSION_LABEL = BYTRACE_TAG_SCREEN;
const std::string DSCREEN_SOURCE_RELEASE_SESSION_START = "DSCREEN_SOURCE_RELEASE_SESSION_START";
//SinkTrans_CloseSession/ReleaseSession
constexpr uint64_t DSCREEN_SINK_CLOSE_SESSION_LABEL = BYTRACE_TAG_SCREEN;
const std::string DSCREEN_SINK_CLOSE_SESSION_START = "DSCREEN_SINK_CLOSE_SESSION_START";
constexpr uint64_t DSCREEN_SINK_RELEASE_SESSION_LABEL = BYTRACE_TAG_SCREEN;
const std::string DSCREEN_SINK_RELEASE_SESSION_START = "DSCREEN_SINK_RELEASE_SESSION_START";
//StartEncoder/StopEncoder/ReleaseEncoder
constexpr uint64_t DSCREEN_START_ENCODER_LABEL = BYTRACE_TAG_SCREEN;
const std::string DSCREEN_START_ENCODER_START = "DSCREEN_START_ENCODER_START";
constexpr uint64_t DSCREEN_STOP_ENCODER_LABEL = BYTRACE_TAG_SCREEN;
const std::string DSCREEN_STOP_ENCODER_START = "DSCREEN_STOP_ENCODER_START";
constexpr uint64_t DSCREEN_RELESSE_ENCODER_LABEL = BYTRACE_TAG_SCREEN;
const std::string DSCREEN_RELESSE_ENCODER_START = "DSCREEN_RELESSE_ENCODER_START";
//StartDecoder/StopDecoder/ReleaseDecoder
constexpr uint64_t DSCREEN_START_DECODER_LABEL = BYTRACE_TAG_SCREEN;
const std::string DSCREEN_START_DECODER_START = "DSCREEN_START_DECODER_START";
constexpr uint64_t DSCREEN_STOP_DECODER_LABEL = BYTRACE_TAG_SCREEN;
const std::string DSCREEN_STOP_DECODER_START = "DSCREEN_STOP_DECODER_START";
constexpr uint64_t DSCREEN_RELEASE_DECODER_LABEL = BYTRACE_TAG_SCREEN;
const std::string DSCREEN_SOURCE_LOAD_SYSTEM_ABILITY_START = "DSCREEN_SOURCE_LOAD_SYSTEM_ABILITY_START";
const std::string DSCREEN_SINK_LOAD_SYSTEM_ABILITY_START = "DSCREEN_SINK_LOAD_SYSTEM_ABILITY_START";
const std::string DSCREEN_SOURCE_OPEN_SESSION_START = "DSCREEN_SOURCE_OPEN_SESSION_START";
const std::string DSCREEN_SOURCE_CLOSE_SESSION_START = "DSCREEN_SOURCE_CLOSE_SESSION_START";
const std::string DSCREEN_SOURCE_RELEASE_SESSION_START = "DSCREEN_SOURCE_RELEASE_SESSION_START";
const std::string DSCREEN_SINK_CLOSE_SESSION_START = "DSCREEN_SINK_CLOSE_SESSION_START";
const std::string DSCREEN_SINK_RELEASE_SESSION_START = "DSCREEN_SINK_RELEASE_SESSION_START";
const std::string DSCREEN_START_ENCODER_START = "DSCREEN_START_ENCODER_START";
const std::string DSCREEN_STOP_ENCODER_START = "DSCREEN_STOP_ENCODER_START";
const std::string DSCREEN_RELESSE_ENCODER_START = "DSCREEN_RELESSE_ENCODER_START";
const std::string DSCREEN_START_DECODER_START = "DSCREEN_START_DECODER_START";
const std::string DSCREEN_STOP_DECODER_START = "DSCREEN_STOP_DECODER_START";
const std::string DSCREEN_RELEASE_DECODER_START = "DSCREEN_RELEASE_DECODER_START";
} // namespace DistributedHardware
} // namespace OHOS
@@ -48,11 +48,11 @@ ohos_shared_library("distributed_screen_sink_sdk") {
external_deps = [
"hisysevent_native:libhisysevent",
"hitrace_native:hitrace_meter",
"hiviewdfx_hilog_native:libhilog",
"ipc:ipc_core",
"safwk:system_ability_fwk",
"samgr_standard:samgr_proxy",
"hitrace_native:hitrace_meter",
]
subsystem_name = "distributedhardware"
@@ -50,11 +50,11 @@ ohos_shared_library("distributed_screen_source_sdk") {
external_deps = [
"hisysevent_native:libhisysevent",
"hitrace_native:hitrace_meter",
"hiviewdfx_hilog_native:libhilog",
"ipc:ipc_core",
"safwk:system_ability_fwk",
"samgr_standard:samgr_proxy",
"hitrace_native:hitrace_meter",
]
subsystem_name = "distributedhardware"
@@ -63,9 +63,9 @@ ohos_shared_library("distributed_screen_sinktrans") {
external_deps = [
"dsoftbus_standard:softbus_client",
"hisysevent_native:libhisysevent",
"hitrace_native:hitrace_meter",
"hiviewdfx_hilog_native:libhilog",
"multimedia_media_standard:media_client",
"hitrace_native:hitrace_meter",
]
subsystem_name = "distributedhardware"
@@ -62,9 +62,9 @@ ohos_shared_library("distributed_screen_sourcetrans") {
external_deps = [
"dsoftbus_standard:softbus_client",
"hisysevent_native:libhisysevent",
"hitrace_native:hitrace_meter",
"hiviewdfx_hilog_native:libhilog",
"multimedia_media_standard:media_client",
"hitrace_native:hitrace_meter",
]
subsystem_name = "distributedhardware"