--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/25fe7258-fd91-48e1-82df-6c3879a88e6en%40chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CALNjmModKKuMjZ9noGpHjOYd8JaunGA-3%2B46DV79Ln9drGKoQw%40mail.gmail.com.
I can’t post to that link and do not immediately have time to investigate more in-depth, but I did do a quick rebuild:
git rebase-update
gclient sync
autoninja -C out/Default chrome
On my Ubuntu x86_64 box this produces binaries that run on my Asahi arm64 install.
target_cpu = "arm64"
enable_nacl = false
symbol_level = 0
blink_symbol_level = 0
v8_symbol_level = 0
is_debug = false
dcheck_always_on = false
is_official_build = true
cc_wrapper = "ccache"
(ccache sloppiness is set to include_file_mtime in env)
Not sure what causes the difference, but the possibility of an issue exactly like this is exactly why I wanted to move both the declaration and its implementation to separate files added to base, but the reviewers on the original patch did not seem to like that.
Thanks,
Jorrit Jongma
This was my change to page_allocator_constants.h, after which the compilation went through —PageAllocationGranularityShift() {
#if BUILDFLAG(IS_WIN) || defined(ARCH_CPU_PPC64)
// Modern ppc64 systems support 4kB (shift = 12) and 64kB (shift = 16) page
// sizes. Since 64kB is the de facto standard on the platform and binaries
// compiled for 64kB are likely to work on 4kB systems, 64kB is a good choice
// here.
return 16; // 64kB
#elif defined(_MIPS_ARCH_LOONGSON)
return 14; // 16kB
#elif BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS)
return vm_page_shift;
#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)
// arm64 supports 4kb (shift = 12), 16kb (shift = 14), and 64kb (shift = 16)
// page sizes. Retrieve from or initialize cache.
// int shift = page_characteristics.shift.load(std::memory_order_relaxed);
// if (UNLIKELY(shift == 0)) {
// shift = __builtin_ctz((int)PageAllocationGranularity());
// page_characteristics.shift.store(shift, std::memory_order_relaxed);
// }
return 12;
#else
return 12; // 4kB
#endif
}
PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE size_t
PageAllocationGranularity() {
#if BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS)
// This is literally equivalent to |1 << PageAllocationGranularityShift()|
// below, but was separated out for IS_APPLE to avoid << on a non-constexpr.
return vm_page_size;
#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)
// arm64 supports 4kb, 16kb, and 64kb page sizes. Retrieve from or
// initialize cache.
return 1 << PageAllocationGranularityShift();
#else
return 1 << PageAllocationGranularityShift();
#endif
}