diff --git a/BUILD.gn b/BUILD.gn index b986e5e..97aba4c 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -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", diff --git a/tooling/agent/heapprofiler_impl.h b/tooling/agent/heapprofiler_impl.h index 2d2ef07..5c5b7bf 100644 --- a/tooling/agent/heapprofiler_impl.h +++ b/tooling/agent/heapprofiler_impl.h @@ -16,7 +16,9 @@ #ifndef ECMASCRIPT_TOOLING_AGENT_HEAPPROFILER_IMPL_H #define ECMASCRIPT_TOOLING_AGENT_HEAPPROFILER_IMPL_H +#if defined(ECMASCRIPT_SUPPORT_HEAPPROFILER) #include +#endif #include "tooling/base/pt_params.h" #include "tooling/base/pt_events.h" @@ -49,7 +51,9 @@ public: DispatchResponse GetSamplingProfile(std::unique_ptr *profile); DispatchResponse StartSampling(const StartSamplingParams ¶ms); DispatchResponse StartTrackingHeapObjects(const StartTrackingHeapObjectsParams ¶ms); +#if defined(ECMASCRIPT_SUPPORT_HEAPPROFILER) static void HeapTrackingCallback(uv_timer_t* handle); +#endif DispatchResponse StopSampling(std::unique_ptr *profile); DispatchResponse StopTrackingHeapObjects(const StopTrackingHeapObjectsParams ¶ms); // 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 \ No newline at end of file +#endif