68a102cab2
Revert "Revert "Fixed issue in MallocHooks where a MallocHookScope was accidentally removed during a merge, causing a deadlock in the hooks. Also turned off stack trace collection in a test that was timing out as a result of the stack trace collection.""
This reverts commit 1a5b555aa9.
BUG=
R=zra@google.com
Review-Url: https://codereview.chromium.org/2711353003 .
67 lines
1.2 KiB
C++
67 lines
1.2 KiB
C++
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
#include "platform/globals.h"
|
|
|
|
#if !defined(DART_USE_TCMALLOC) || defined(PRODUCT) || \
|
|
defined(TARGET_ARCH_DBC) || defined(TARGET_OS_FUCHSIA)
|
|
|
|
#include "vm/malloc_hooks.h"
|
|
|
|
namespace dart {
|
|
|
|
void MallocHooks::InitOnce() {
|
|
// Do nothing.
|
|
}
|
|
|
|
|
|
void MallocHooks::TearDown() {
|
|
// Do nothing.
|
|
}
|
|
|
|
|
|
bool MallocHooks::ProfilingEnabled() {
|
|
return false;
|
|
}
|
|
|
|
|
|
bool MallocHooks::stack_trace_collection_enabled() {
|
|
return false;
|
|
}
|
|
|
|
|
|
void MallocHooks::set_stack_trace_collection_enabled(bool enabled) {
|
|
// Do nothing.
|
|
}
|
|
|
|
|
|
void MallocHooks::ResetStats() {
|
|
// Do nothing.
|
|
}
|
|
|
|
|
|
bool MallocHooks::Active() {
|
|
return false;
|
|
}
|
|
|
|
|
|
void MallocHooks::PrintToJSONObject(JSONObject* jsobj) {
|
|
// Do nothing.
|
|
}
|
|
|
|
|
|
intptr_t MallocHooks::allocation_count() {
|
|
return 0;
|
|
}
|
|
|
|
|
|
intptr_t MallocHooks::heap_allocated_memory_in_bytes() {
|
|
return 0;
|
|
}
|
|
|
|
} // namespace dart
|
|
|
|
#endif // !defined(DART_USE_TCMALLOC) || defined(PRODUCT) ||
|
|
// defined(TARGET_ARCH_DBC) || defined(TARGET_OS_FUCHSIA)
|