From 38ac19d6574fcd18eb3945b154ca2aa4d0a5cc70 Mon Sep 17 00:00:00 2001 From: wei dong Date: Wed, 22 Dec 2021 17:19:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D64k=E9=A1=B5=E5=A4=A7?= =?UTF-8?q?=E5=B0=8F=E6=97=B6=EF=BC=8Cqtwebengine=E8=BF=90=E8=A1=8C?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wei dong --- qt5-qtwebengine.spec | 8 +- ...where-src-5.11.1-enable-64k-pagesize.patch | 89 +++++++++++++++++++ 2 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 qtwebengine-everywhere-src-5.11.1-enable-64k-pagesize.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 72aeacf..a8027e7 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -6,7 +6,7 @@ Name: qt5-qtwebengine Version: 5.11.1 -Release: 10 +Release: 11 Summary: Qt5 - QtWebEngine components License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2) URL: http://www.qt.io @@ -43,6 +43,9 @@ Patch0006: qtwebengine-everywhere-src-5.10.0-gn-bootstrap-verbose.patch # From: https://gitlab.com/unity-mageia/qtwebengine5/-/blob/master/qtwebengine-everywhere-src-5.10.1-gcc8-alignof.patch Patch0009: qtwebengine-everywhere-src-5.10.1-gcc8-alignof.patch Patch0010: qtwebengine-everywhere-src-5.11.1-fix-U16_NEXT-calls.patch +## bug48291 add for deepin manual +Patch0011: qtwebengine-everywhere-src-5.11.1-enable-64k-pagesize.patch + Patch6000: qtwebengine-fix-pluse-stubs.patch BuildRequires: qt5-qtbase-devel qt5-qtbase-private-devel qt5-qtdeclarative-devel qt5-qtxmlpatterns-devel @@ -221,6 +224,9 @@ done %{_qt5_examplesdir}/ %changelog +* Wed Dec 22 2021 weidong - 5.11.1-11 +- Fix bug48291,enable 64k pagesize + * Fri Jul 24 2020 maminjie -5.11.1-10 - Fix the build error for U16_NEXT calls diff --git a/qtwebengine-everywhere-src-5.11.1-enable-64k-pagesize.patch b/qtwebengine-everywhere-src-5.11.1-enable-64k-pagesize.patch new file mode 100644 index 0000000..a3ab6d4 --- /dev/null +++ b/qtwebengine-everywhere-src-5.11.1-enable-64k-pagesize.patch @@ -0,0 +1,89 @@ +diff --git a/src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator.h b/src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator.h +index a39b4e3013e82fcfcde99d6e4e0a4bb798260984..a25d7a4e16ba9fec94617e1e82631604ebe1d852 100644 +--- a/src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator.h ++++ b/src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator.h +@@ -15,13 +15,13 @@ + + namespace base { + +-#if defined(OS_WIN) ++//#if defined(OS_WIN) + static const size_t kPageAllocationGranularityShift = 16; // 64KB +-#elif defined(_MIPS_ARCH_LOONGSON) +-static const size_t kPageAllocationGranularityShift = 14; // 16KB +-#else +-static const size_t kPageAllocationGranularityShift = 12; // 4KB +-#endif ++//#elif defined(_MIPS_ARCH_LOONGSON) ++//static const size_t kPageAllocationGranularityShift = 14; // 16KB ++//#else ++//static const size_t kPageAllocationGranularityShift = 12; // 4KB ++//#endif + static const size_t kPageAllocationGranularity = + 1 << kPageAllocationGranularityShift; + static const size_t kPageAllocationGranularityOffsetMask = +@@ -29,11 +29,11 @@ static const size_t kPageAllocationGranularityOffsetMask = + static const size_t kPageAllocationGranularityBaseMask = + ~kPageAllocationGranularityOffsetMask; + +-#if defined(_MIPS_ARCH_LOONGSON) +-static const size_t kSystemPageSize = 16384; +-#else +-static const size_t kSystemPageSize = 4096; +-#endif ++//#if defined(_MIPS_ARCH_LOONGSON) ++//static const size_t kSystemPageSize = 16384; ++//#else ++static const size_t kSystemPageSize = 65536; ++//#endif + static const size_t kSystemPageOffsetMask = kSystemPageSize - 1; + static_assert((kSystemPageSize & (kSystemPageSize - 1)) == 0, + "kSystemPageSize must be power of 2"); +diff --git a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc.h b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc.h +index 6e5143b094ae2e99fdcfe6b9d60d93a662200d29..4f7c1498ee2618464a4cd9dfa473ea28ea9a3944 100644 +--- a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc.h ++++ b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc.h +@@ -97,11 +97,14 @@ static const size_t kBucketShift = (kAllocationGranularity == 8) ? 3 : 2; + // system page of the span. For our current max slot span size of 64k and other + // constant values, we pack _all_ PartitionRootGeneric::Alloc() sizes perfectly + // up against the end of a system page. +-#if defined(_MIPS_ARCH_LOONGSON) +-static const size_t kPartitionPageShift = 16; // 64KB +-#else +-static const size_t kPartitionPageShift = 14; // 16KB +-#endif ++//#if defined(_MIPS_ARCH_LOONGSON) ++//static const size_t kPartitionPageShift = 16; // 64KB ++//#else ++//static const size_t kPartitionPageShift = 14; // 16KB ++//#endif ++ ++static const size_t kPartitionPageShift = 18; // 256KB ++ + static const size_t kPartitionPageSize = 1 << kPartitionPageShift; + static const size_t kPartitionPageOffsetMask = kPartitionPageSize - 1; + static const size_t kPartitionPageBaseMask = ~kPartitionPageOffsetMask; +diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/platform/heap/HeapPage.h b/src/3rdparty/chromium/third_party/WebKit/Source/platform/heap/HeapPage.h +index 20674563ebabb60dccbb8adb4ebc2a4b2cee4117..7b47a30d5502f6c1222226017cddfac6082daeec 100644 +--- a/src/3rdparty/chromium/third_party/WebKit/Source/platform/heap/HeapPage.h ++++ b/src/3rdparty/chromium/third_party/WebKit/Source/platform/heap/HeapPage.h +@@ -62,15 +62,15 @@ constexpr size_t kBlinkPageBaseMask = ~kBlinkPageOffsetMask; + constexpr size_t kBlinkPagesPerRegion = 10; + + // TODO(nya): Replace this with something like #if ENABLE_NACL. +-#if 0 ++//#if 0 + // NaCl's system page size is 64 KiB. This causes a problem in Oilpan's heap + // layout because Oilpan allocates two guard pages for each Blink page (whose + // size is kBlinkPageSize = 2^17 = 128 KiB). So we don't use guard pages in + // NaCl. + constexpr size_t kBlinkGuardPageSize = 0; +-#else +-constexpr size_t kBlinkGuardPageSize = base::kSystemPageSize; +-#endif ++//#else ++//constexpr size_t kBlinkGuardPageSize = base::kSystemPageSize; ++//#endif + + // Double precision floats are more efficient when 8-byte aligned, so we 8-byte + // align all allocations (even on 32 bit systems). -- Gitee