fix build error

Signed-off-by: liu-zelin <liuzelin8@huawei.com>
Change-Id: Ib659897075cfb99151544243073b22ea706c3e01
This commit is contained in:
liu-zelin 2023-10-18 17:19:22 +08:00
parent 3e519b1f78
commit 680e411d1e
2 changed files with 10 additions and 2 deletions

View File

@ -151,7 +151,9 @@ config("ark_toolchain_common_config") {
config("ark_toolchain_public_config") {
defines = []
if (!is_mingw && !is_mac) {
# debug is not compatible with ios for now
if (!is_mingw && !is_mac && target_os != "ios") {
defines += [
"ECMASCRIPT_SUPPORT_CPUPROFILER",
"ECMASCRIPT_SUPPORT_HEAPPROFILER",

View File

@ -16,7 +16,9 @@
#ifndef ECMASCRIPT_TOOLING_AGENT_HEAPPROFILER_IMPL_H
#define ECMASCRIPT_TOOLING_AGENT_HEAPPROFILER_IMPL_H
#if defined(ECMASCRIPT_SUPPORT_HEAPPROFILER)
#include <uv.h>
#endif
#include "tooling/base/pt_params.h"
#include "tooling/base/pt_events.h"
@ -49,7 +51,9 @@ public:
DispatchResponse GetSamplingProfile(std::unique_ptr<SamplingHeapProfile> *profile);
DispatchResponse StartSampling(const StartSamplingParams &params);
DispatchResponse StartTrackingHeapObjects(const StartTrackingHeapObjectsParams &params);
#if defined(ECMASCRIPT_SUPPORT_HEAPPROFILER)
static void HeapTrackingCallback(uv_timer_t* handle);
#endif
DispatchResponse StopSampling(std::unique_ptr<SamplingHeapProfile> *profile);
DispatchResponse StopTrackingHeapObjects(const StopTrackingHeapObjectsParams &params);
// The params type of TakeHeapSnapshot is the same as of StopTrackingHeapObjects.
@ -171,7 +175,9 @@ private:
const EcmaVM *vm_ {nullptr};
Frontend frontend_;
HeapProfilerStream stream_;
#if defined(ECMASCRIPT_SUPPORT_HEAPPROFILER)
uv_timer_t handle_ {};
#endif
};
} // namespace panda::ecmascript::tooling
#endif
#endif