mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 16:41:07 +00:00
[standalone] Update tcmalloc to 2.10.
Remove some architecture limitations. TEST=ci Change-Id: I9703729d3e871687cd4951ec40d3d09ae579871f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247864 Reviewed-by: Alexander Aprelev <aam@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com> Reviewed-by: William Hesse <whesse@google.com>
This commit is contained in:
parent
83f0bb25a4
commit
6e3ef8b9e6
2
DEPS
2
DEPS
|
@ -72,7 +72,7 @@ vars = {
|
||||||
# Scripts that make 'git cl format' work.
|
# Scripts that make 'git cl format' work.
|
||||||
"clang_format_scripts_rev": "bb994c6f067340c1135eb43eed84f4b33cfa7397",
|
"clang_format_scripts_rev": "bb994c6f067340c1135eb43eed84f4b33cfa7397",
|
||||||
|
|
||||||
"gperftools_revision": "180bfa10d7cb38e8b3784d60943d50e8fcef0dcb",
|
"gperftools_revision": "bf8b714bf5075d0a6f2f28504b43095e2b1e11c5",
|
||||||
|
|
||||||
# Revisions of /third_party/* dependencies.
|
# Revisions of /third_party/* dependencies.
|
||||||
# Note that putting an EOL comment after a dependency below will prevent the
|
# Note that putting an EOL comment after a dependency below will prevent the
|
||||||
|
|
17
runtime/vm/malloc_hooks_riscv.cc
Normal file
17
runtime/vm/malloc_hooks_riscv.cc
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
// Copyright (c) 2022, 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 "vm/malloc_hooks.h"
|
||||||
|
|
||||||
|
#include "vm/globals.h"
|
||||||
|
|
||||||
|
#if defined(HOST_ARCH_RISCV32) || defined(HOST_ARCH_RISCV64)
|
||||||
|
|
||||||
|
namespace dart {
|
||||||
|
|
||||||
|
const intptr_t kSkipCount = 5;
|
||||||
|
|
||||||
|
} // namespace dart
|
||||||
|
|
||||||
|
#endif // defined(HOST_ARCH_RISCV32) || defined(HOST_ARCH_RISCV64)
|
|
@ -165,6 +165,7 @@ vm_sources = [
|
||||||
"malloc_hooks_arm.cc",
|
"malloc_hooks_arm.cc",
|
||||||
"malloc_hooks_arm64.cc",
|
"malloc_hooks_arm64.cc",
|
||||||
"malloc_hooks_ia32.cc",
|
"malloc_hooks_ia32.cc",
|
||||||
|
"malloc_hooks_riscv.cc",
|
||||||
"malloc_hooks_tcmalloc.cc",
|
"malloc_hooks_tcmalloc.cc",
|
||||||
"malloc_hooks_unsupported.cc",
|
"malloc_hooks_unsupported.cc",
|
||||||
"malloc_hooks_x64.cc",
|
"malloc_hooks_x64.cc",
|
||||||
|
|
2
third_party/tcmalloc/BUILD.gn
vendored
2
third_party/tcmalloc/BUILD.gn
vendored
|
@ -128,8 +128,6 @@ source_set("tcmalloc") {
|
||||||
"gperftools/src/fake_stacktrace_scope.cc",
|
"gperftools/src/fake_stacktrace_scope.cc",
|
||||||
|
|
||||||
# Not using the cpuprofiler
|
# Not using the cpuprofiler
|
||||||
"gperftools/src/base/thread_lister.c",
|
|
||||||
"gperftools/src/base/thread_lister.h",
|
|
||||||
"gperftools/src/profile-handler.cc",
|
"gperftools/src/profile-handler.cc",
|
||||||
"gperftools/src/profile-handler.h",
|
"gperftools/src/profile-handler.h",
|
||||||
"gperftools/src/profiledata.cc",
|
"gperftools/src/profiledata.cc",
|
||||||
|
|
2
third_party/tcmalloc/configure_command
vendored
2
third_party/tcmalloc/configure_command
vendored
|
@ -1,2 +1,2 @@
|
||||||
./auto_gen.sh
|
./autogen.sh
|
||||||
./configure --enable-emergency-malloc --enable-frame-pointers --disable-cpu-profiler --disable-heap-checker --disable-debugalloc --enable-sized-delete --disable-libunwind
|
./configure --enable-emergency-malloc --enable-frame-pointers --disable-cpu-profiler --disable-heap-checker --disable-debugalloc --enable-sized-delete --disable-libunwind
|
||||||
|
|
50
third_party/tcmalloc/include/config.h
vendored
50
third_party/tcmalloc/include/config.h
vendored
|
@ -24,9 +24,6 @@
|
||||||
/* Define to 1 if you have the <asm/ptrace.h> header file. */
|
/* Define to 1 if you have the <asm/ptrace.h> header file. */
|
||||||
/* #undef HAVE_ASM_PTRACE_H */
|
/* #undef HAVE_ASM_PTRACE_H */
|
||||||
|
|
||||||
/* Define to 1 if compiler supports __builtin_stack_pointer */
|
|
||||||
/* #undef HAVE_BUILTIN_STACK_POINTER */
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <conflict-signal.h> header file. */
|
/* Define to 1 if you have the <conflict-signal.h> header file. */
|
||||||
/* #undef HAVE_CONFLICT_SIGNAL_H */
|
/* #undef HAVE_CONFLICT_SIGNAL_H */
|
||||||
|
|
||||||
|
@ -64,10 +61,6 @@
|
||||||
*/
|
*/
|
||||||
/* #undef HAVE_DECL_SLEEP */
|
/* #undef HAVE_DECL_SLEEP */
|
||||||
|
|
||||||
/* Define to 1 if you have the declaration of `uname', and to 0 if you don't.
|
|
||||||
*/
|
|
||||||
#define HAVE_DECL_UNAME 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the declaration of `valloc', and to 0 if you don't.
|
/* Define to 1 if you have the declaration of `valloc', and to 0 if you don't.
|
||||||
*/
|
*/
|
||||||
#define HAVE_DECL_VALLOC 1
|
#define HAVE_DECL_VALLOC 1
|
||||||
|
@ -114,15 +107,9 @@
|
||||||
/* Define to 1 if you have the <malloc.h> header file. */
|
/* Define to 1 if you have the <malloc.h> header file. */
|
||||||
#define HAVE_MALLOC_H 1
|
#define HAVE_MALLOC_H 1
|
||||||
|
|
||||||
/* Define to 1 if you have the <memory.h> header file. */
|
|
||||||
#define HAVE_MEMORY_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have a working `mmap' system call. */
|
/* Define to 1 if you have a working `mmap' system call. */
|
||||||
#define HAVE_MMAP 1
|
#define HAVE_MMAP 1
|
||||||
|
|
||||||
/* define if the compiler implements namespaces */
|
|
||||||
#define HAVE_NAMESPACES 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <poll.h> header file. */
|
/* Define to 1 if you have the <poll.h> header file. */
|
||||||
#define HAVE_POLL_H 1
|
#define HAVE_POLL_H 1
|
||||||
|
|
||||||
|
@ -148,6 +135,9 @@
|
||||||
/* Define to 1 if you have the <stdint.h> header file. */
|
/* Define to 1 if you have the <stdint.h> header file. */
|
||||||
#define HAVE_STDINT_H 1
|
#define HAVE_STDINT_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdio.h> header file. */
|
||||||
|
#define HAVE_STDIO_H 1
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
#define HAVE_STDLIB_H 1
|
#define HAVE_STDLIB_H 1
|
||||||
|
|
||||||
|
@ -202,9 +192,6 @@
|
||||||
/* Define to 1 if you have the <unwind.h> header file. */
|
/* Define to 1 if you have the <unwind.h> header file. */
|
||||||
#define HAVE_UNWIND_H 1
|
#define HAVE_UNWIND_H 1
|
||||||
|
|
||||||
/* Define to 1 if you have the <valgrind.h> header file. */
|
|
||||||
/* #undef HAVE_VALGRIND_H */
|
|
||||||
|
|
||||||
/* define if your compiler has __attribute__ */
|
/* define if your compiler has __attribute__ */
|
||||||
#define HAVE___ATTRIBUTE__ 1
|
#define HAVE___ATTRIBUTE__ 1
|
||||||
|
|
||||||
|
@ -214,9 +201,6 @@
|
||||||
/* Define to 1 if compiler supports __environ */
|
/* Define to 1 if compiler supports __environ */
|
||||||
#define HAVE___ENVIRON 1
|
#define HAVE___ENVIRON 1
|
||||||
|
|
||||||
/* Define to 1 if the system has the type `__int64'. */
|
|
||||||
/* #undef HAVE___INT64 */
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `__sbrk' function. */
|
/* Define to 1 if you have the `__sbrk' function. */
|
||||||
#define HAVE___SBRK 1
|
#define HAVE___SBRK 1
|
||||||
|
|
||||||
|
@ -239,7 +223,7 @@
|
||||||
#define PACKAGE_NAME "gperftools"
|
#define PACKAGE_NAME "gperftools"
|
||||||
|
|
||||||
/* Define to the full name and version of this package. */
|
/* Define to the full name and version of this package. */
|
||||||
#define PACKAGE_STRING "gperftools 2.8"
|
#define PACKAGE_STRING "gperftools 2.10"
|
||||||
|
|
||||||
/* Define to the one symbol short name of this package. */
|
/* Define to the one symbol short name of this package. */
|
||||||
#define PACKAGE_TARNAME "gperftools"
|
#define PACKAGE_TARNAME "gperftools"
|
||||||
|
@ -248,7 +232,7 @@
|
||||||
#define PACKAGE_URL ""
|
#define PACKAGE_URL ""
|
||||||
|
|
||||||
/* Define to the version of this package. */
|
/* Define to the version of this package. */
|
||||||
#define PACKAGE_VERSION "2.8"
|
#define PACKAGE_VERSION "2.10"
|
||||||
|
|
||||||
/* How to access the PC from a struct ucontext */
|
/* How to access the PC from a struct ucontext */
|
||||||
/* #undef PC_FROM_UCONTEXT */
|
/* #undef PC_FROM_UCONTEXT */
|
||||||
|
@ -260,15 +244,6 @@
|
||||||
"config.h" before anything else. */
|
"config.h" before anything else. */
|
||||||
#define PERFTOOLS_DLL_DECL /**/
|
#define PERFTOOLS_DLL_DECL /**/
|
||||||
|
|
||||||
/* printf format code for printing a size_t and ssize_t */
|
|
||||||
#define PRIdS "ld"
|
|
||||||
|
|
||||||
/* printf format code for printing a size_t and ssize_t */
|
|
||||||
#define PRIuS "lu"
|
|
||||||
|
|
||||||
/* printf format code for printing a size_t and ssize_t */
|
|
||||||
#define PRIxS "lx"
|
|
||||||
|
|
||||||
/* Mark the systems where we know it's bad if pthreads runs too
|
/* Mark the systems where we know it's bad if pthreads runs too
|
||||||
early before main (before threads are initialized, presumably). */
|
early before main (before threads are initialized, presumably). */
|
||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__
|
||||||
|
@ -279,12 +254,11 @@
|
||||||
your system. */
|
your system. */
|
||||||
/* #undef PTHREAD_CREATE_JOINABLE */
|
/* #undef PTHREAD_CREATE_JOINABLE */
|
||||||
|
|
||||||
/* Define to 1 if you have the ANSI C header files. */
|
/* Define to 1 if all of the C90 standard headers exist (not just the ones
|
||||||
|
required in a freestanding environment). This macro is provided for
|
||||||
|
backward compatibility; new code need not use it. */
|
||||||
#define STDC_HEADERS 1
|
#define STDC_HEADERS 1
|
||||||
|
|
||||||
/* the namespace where STL code like vector<> is defined */
|
|
||||||
#define STL_NAMESPACE std
|
|
||||||
|
|
||||||
/* Define 8 bytes of allocation alignment for tcmalloc */
|
/* Define 8 bytes of allocation alignment for tcmalloc */
|
||||||
/* #undef TCMALLOC_ALIGN_8BYTES */
|
/* #undef TCMALLOC_ALIGN_8BYTES */
|
||||||
|
|
||||||
|
@ -292,19 +266,13 @@
|
||||||
/* #undef TCMALLOC_PAGE_SIZE_SHIFT */
|
/* #undef TCMALLOC_PAGE_SIZE_SHIFT */
|
||||||
|
|
||||||
/* Version number of package */
|
/* Version number of package */
|
||||||
#define VERSION "2.8"
|
#define VERSION "2.10"
|
||||||
|
|
||||||
/* C99 says: define this to get the PRI... macros from stdint.h */
|
/* C99 says: define this to get the PRI... macros from stdint.h */
|
||||||
#ifndef __STDC_FORMAT_MACROS
|
#ifndef __STDC_FORMAT_MACROS
|
||||||
# define __STDC_FORMAT_MACROS 1
|
# define __STDC_FORMAT_MACROS 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
|
||||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
|
||||||
#ifndef __cplusplus
|
|
||||||
/* #undef inline */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __MINGW32__
|
#ifdef __MINGW32__
|
||||||
#include "windows/mingw.h"
|
#include "windows/mingw.h"
|
||||||
|
|
|
@ -1291,6 +1291,7 @@
|
||||||
"arguments": [
|
"arguments": [
|
||||||
"--no-clang",
|
"--no-clang",
|
||||||
"--use-qemu",
|
"--use-qemu",
|
||||||
|
"--use-mallinfo2",
|
||||||
"dart_precompiled_runtime",
|
"dart_precompiled_runtime",
|
||||||
"runtime"
|
"runtime"
|
||||||
]
|
]
|
||||||
|
|
|
@ -245,9 +245,7 @@ def ToGnArgs(args, mode, arch, target_os, sanitizer, verify_sdk_hash):
|
||||||
|
|
||||||
# Use tcmalloc only when targeting Linux and when not using ASAN.
|
# Use tcmalloc only when targeting Linux and when not using ASAN.
|
||||||
gn_args['dart_use_tcmalloc'] = ((gn_args['target_os'] == 'linux') and
|
gn_args['dart_use_tcmalloc'] = ((gn_args['target_os'] == 'linux') and
|
||||||
(gn_args['target_cpu'] != 'arm') and
|
|
||||||
(gn_args['target_cpu'] != 'riscv32') and
|
(gn_args['target_cpu'] != 'riscv32') and
|
||||||
(gn_args['target_cpu'] != 'riscv64') and
|
|
||||||
sanitizer == 'none')
|
sanitizer == 'none')
|
||||||
|
|
||||||
# Use mallinfo2 if specified on the command line
|
# Use mallinfo2 if specified on the command line
|
||||||
|
|
Loading…
Reference in a new issue