Bug 1641122 - Fix 32-bit Android profiler buffer size default - r=canaltinova

Differential Revision: https://phabricator.services.mozilla.com/D77016
This commit is contained in:
Gerald Squelart 2020-05-27 19:41:46 +00:00
parent 94396bf21f
commit cf61fd1e10
2 changed files with 10 additions and 10 deletions

View File

@ -238,19 +238,19 @@ MFBT_API bool IsThreadBeingProfiled();
//---------------------------------------------------------------------------
static constexpr PowerOfTwo32 BASE_PROFILER_DEFAULT_ENTRIES =
# if !defined(ARCH_ARMV6)
MakePowerOfTwo32<1u << 20>(); // 1'048'576 entries = 8MB
# if !defined(GP_PLAT_arm_android)
MakePowerOfTwo32<1024 * 1024>(); // 1M entries = 8MB
# else
MakePowerOfTwo32<1u << 17>(); // 131'072 entries = 1MB
MakePowerOfTwo32<128 * 1024>(); // 128k entries = 1MB
# endif
// Startup profiling usually need to capture more data, especially on slow
// systems.
static constexpr PowerOfTwo32 BASE_PROFILER_DEFAULT_STARTUP_ENTRIES =
# if !defined(ARCH_ARMV6)
MakePowerOfTwo32<1u << 22>(); // 4'194'304 entries = 32MB
# if !defined(GP_PLAT_arm_android)
MakePowerOfTwo32<4 * 1024 * 1024>(); // 4M entries = 32MB
# else
MakePowerOfTwo32<1u << 17>(); // 131'072 = 1MB
MakePowerOfTwo32<256 * 1024>(); // 256k entries = 2MB
# endif
# define BASE_PROFILER_DEFAULT_DURATION 20

View File

@ -309,19 +309,19 @@ bool IsThreadRegistered();
//---------------------------------------------------------------------------
static constexpr mozilla::PowerOfTwo32 PROFILER_DEFAULT_ENTRIES =
# if !defined(ARCH_ARMV6)
# if !defined(GP_PLAT_arm_android)
mozilla::MakePowerOfTwo32<8 * 1024 * 1024>(); // 8M entries = 64MB
# else
mozilla::MakePowerOfTwo32<512 * 1024>(); // 512k entries = 4MB
mozilla::MakePowerOfTwo32<2 * 1024 * 1024>(); // 2M entries = 16MB
# endif
// Startup profiling usually need to capture more data, especially on slow
// systems.
static constexpr mozilla::PowerOfTwo32 PROFILER_DEFAULT_STARTUP_ENTRIES =
# if !defined(ARCH_ARMV6)
# if !defined(GP_PLAT_arm_android)
mozilla::MakePowerOfTwo32<64 * 1024 * 1024>(); // 64M entries = 512MB
# else
mozilla::MakePowerOfTwo32<512 * 1024>(); // 512k entries = 4MB
mozilla::MakePowerOfTwo32<8 * 1024 * 1024>(); // 8M entries = 64MB
# endif
# define PROFILER_DEFAULT_DURATION 20 /* seconds, for tests only */