distributeddatamgr_data_object/0001-Trim-the-dependencies-on-hitrace-libuv.patch
2023-08-28 11:38:16 +08:00

150 lines
5.8 KiB
Diff

From 88604ee2d4d258ec50e298987f196621e34ee85f Mon Sep 17 00:00:00 2001
From: heppen <hepeng68@huawei.com>
Date: Thu, 3 Aug 2023 11:22:38 +0800
Subject: [PATCH] Trim the dependencies on hitrace/libuv
---
bundle.json | 3 +--
.../innerkitsimpl/src/adaptor/distributed_object_impl.cpp | 5 -----
.../src/adaptor/distributed_object_store_impl.cpp | 7 +++----
interfaces/innerkits/BUILD.gn | 8 ++++----
4 files changed, 8 insertions(+), 15 deletions(-)
diff --git a/bundle.json b/bundle.json
index a8ae0c9..83568ff 100644
--- a/bundle.json
+++ b/bundle.json
@@ -45,7 +45,6 @@
"deps": {
"components": [
"ability_base",
- "ability_runtime",
"hitrace_native",
"dsoftbus",
"distributeddatamgr",
@@ -62,7 +61,7 @@
},
"build": {
"sub_component": [
- "//foundation/distributeddatamgr/data_object/interfaces/jskits:build_module"
+
],
"inner_kits": [
{
diff --git a/frameworks/innerkitsimpl/src/adaptor/distributed_object_impl.cpp b/frameworks/innerkitsimpl/src/adaptor/distributed_object_impl.cpp
index 1e1722a..a61e862 100644
--- a/frameworks/innerkitsimpl/src/adaptor/distributed_object_impl.cpp
+++ b/frameworks/innerkitsimpl/src/adaptor/distributed_object_impl.cpp
@@ -15,7 +15,6 @@
#include "distributed_object_impl.h"
-#include "hitrace.h"
#include "objectstore_errors.h"
#include "string_utils.h"
@@ -55,7 +54,6 @@ uint32_t GetNum(Bytes &data, uint32_t offset, void *val, uint32_t valLen)
uint32_t DistributedObjectImpl::PutDouble(const std::string &key, double value)
{
- HiTrace trace(std::string(__FUNCTION__));
Bytes data;
Type type = Type::TYPE_DOUBLE;
PutNum(&type, 0, sizeof(type), data);
@@ -69,7 +67,6 @@ uint32_t DistributedObjectImpl::PutDouble(const std::string &key, double value)
uint32_t DistributedObjectImpl::PutBoolean(const std::string &key, bool value)
{
- HiTrace trace(std::string(__FUNCTION__));
Bytes data;
Type type = Type::TYPE_BOOLEAN;
PutNum(&type, 0, sizeof(type), data);
@@ -83,7 +80,6 @@ uint32_t DistributedObjectImpl::PutBoolean(const std::string &key, bool value)
uint32_t DistributedObjectImpl::PutString(const std::string &key, const std::string &value)
{
- HiTrace trace(std::string(__FUNCTION__));
Bytes data;
Type type = Type::TYPE_STRING;
PutNum(&type, 0, sizeof(type), data);
@@ -172,7 +168,6 @@ DistributedObjectImpl::DistributedObjectImpl(const std::string &sessionId, FlatO
uint32_t DistributedObjectImpl::PutComplex(const std::string &key, const std::vector<uint8_t> &value)
{
- HiTrace trace(std::string(__FUNCTION__));
Bytes data;
Type type = Type::TYPE_COMPLEX;
PutNum(&type, 0, sizeof(type), data);
diff --git a/frameworks/innerkitsimpl/src/adaptor/distributed_object_store_impl.cpp b/frameworks/innerkitsimpl/src/adaptor/distributed_object_store_impl.cpp
index 5c51ac0..7fb8d21 100644
--- a/frameworks/innerkitsimpl/src/adaptor/distributed_object_store_impl.cpp
+++ b/frameworks/innerkitsimpl/src/adaptor/distributed_object_store_impl.cpp
@@ -15,7 +15,6 @@
#include <thread>
-#include "hitrace.h"
#include "distributed_object_impl.h"
#include "distributed_objectstore_impl.h"
#include "objectstore_errors.h"
@@ -62,7 +61,7 @@ void DistributedObjectStoreImpl::RemoveCacheObject(const std::string &sessionId)
DistributedObject *DistributedObjectStoreImpl::CreateObject(const std::string &sessionId)
{
- HiTrace trace(std::string(__FUNCTION__));
+ //HiTrace trace(std::string(__FUNCTION__));
if (flatObjectStore_ == nullptr) {
LOG_ERROR("DistributedObjectStoreImpl::CreateObject store not opened!");
return nullptr;
@@ -83,7 +82,7 @@ DistributedObject *DistributedObjectStoreImpl::CreateObject(const std::string &s
DistributedObject *DistributedObjectStoreImpl::CreateObject(const std::string &sessionId, uint32_t &status)
{
- HiTrace trace(std::string(__FUNCTION__));
+ //HiTrace trace(std::string(__FUNCTION__));
if (flatObjectStore_ == nullptr) {
LOG_ERROR("DistributedObjectStoreImpl::CreateObject store not opened!");
status = ERR_NULL_OBJECTSTORE;
@@ -106,7 +105,7 @@ DistributedObject *DistributedObjectStoreImpl::CreateObject(const std::string &s
uint32_t DistributedObjectStoreImpl::DeleteObject(const std::string &sessionId)
{
- HiTrace trace(std::string(__FUNCTION__));
+ //HiTrace trace(std::string(__FUNCTION__));
if (flatObjectStore_ == nullptr) {
LOG_ERROR("DistributedObjectStoreImpl::Sync object err ");
return ERR_NULL_OBJECTSTORE;
diff --git a/interfaces/innerkits/BUILD.gn b/interfaces/innerkits/BUILD.gn
index de4bf4e..1f8b87d 100644
--- a/interfaces/innerkits/BUILD.gn
+++ b/interfaces/innerkits/BUILD.gn
@@ -13,7 +13,7 @@
import("//build/ohos.gni")
config("objectstore_config") {
- visibility = [ "//foundation/distributeddatamgr/data_object:*" ]
+ visibility = [ "//foundation/distributeddatamgr/data_object/interfaces/innerkits:*" ]
cflags = [ "-DHILOG_ENABLE" ]
@@ -60,13 +60,13 @@ ohos_shared_library("distributeddataobject_impl") {
"//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:distributeddb",
"//foundation/distributedhardware/device_manager/interfaces/inner_kits/native_cpp:devicemanagersdk",
"//third_party/bounds_checking_function:libsec_shared",
- "//third_party/libuv:uv",
+ #"//third_party/libuv:uv",
]
external_deps = [
"c_utils:utils",
"dsoftbus:softbus_client",
- "hitrace_native:hitrace_meter",
- "hitrace_native:libhitracechain",
+ #"hitrace_native:hitrace_meter",
+ #"hitrace_native:libhitracechain",
"hiviewdfx_hilog_native:libhilog",
"ipc:ipc_core",
"kv_store:distributeddata_inner",
--
2.33.0