| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[cleanup] Fix inl header includes We have many inl headers which either do not include their non-inl header, or are including other headers first. Both can lead to compile errors because definitions of inline functions might not be visible in inl headers. This CL adds a script to fix those includes, and runs it over the whole code base. R=leszeks@chromium.org Change-Id: I1b7b04c59e5a5b89308512bfc40729f7ec4afc38 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6387805 Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#99453} | 1 年前 | |
[heap] Add optional "may grow" hint for heap allocations This CL adds the capability to pass optional hints to heap allocations. In particular this CL adds a "may grow" hint but we can use this for other features in the future. The motivation behind "may grow" is the resizing of large objects that we now support using TryResizeLargeObject(). With out current "first fit" allocation strategy in the region allocation, we simply allocate a large object in the first free region large enough for the allocation. However, this might not work well with resizing because usually we start with a small allocation which we grow later if necessary. We can now run into situations were resizing often fails because we allocated in a small region initially with no room left for growing. The "may grow" hint should solve this by instead allocating in the largest free region instead which should enable us to grow the object to its final size successfully. Since we only grow the last allocation this should only fail if the the largest free region is not large enough for the final objects anyways and a GC needs to happen. In order to implement this, the allocation hint needs to be passed down all the way from the factory allocation method to RegionAllocator. This CL solves this by introducing a V8-internal AllocationHint class that we pass down from the factory method to the MemoryAllocator. In the MemoryAllocator we then need to pass the allocation hint through the V8 API-exposed v8::PageAllocator method. So we can't use our internal AllocationHint type for this. That's why this CL also adds a new v8::PageAllocator::AllocationHint class and a new method v8::PageAllocator::AllocatePages() on the API. This new method receives the allocation hint as an additional argument. The BoundedPageAllocator can then use the allocation hint to change the allocation strategy for RegionAllocator's AllocateRegion(). Bug: 409069381 Change-Id: I60ad4c6da56b2555d86a2f33b7d5f1640329d776 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6495193 Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/main@{#100119} | 1 年前 | |
[isolate-groups] Attach CodeRange to IsolateGroup, not process For multi-cage configurations, we should arrange for isolates within a cage to share a CodeRange, otherwise we will run out of address space trying to allocate a code range near the cage. Bug: 42204573 Change-Id: Ic06af34a84997a2696ec5622a7f55f4a5319c572 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5666698 Reviewed-by: Igor Sheludko <ishell@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Andy Wingo <wingo@igalia.com> Cr-Commit-Position: refs/heads/main@{#94759} | 1 年前 | |
[wasm] Add Wasm interpreter (behind v8_wasm_interpreter build flag) Bug: 338326645 Change-Id: I7da3c68f258e262af5cbd869dcc59619f0bcc9ab Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5509903 Reviewed-by: Michael Achenbach <machenbach@chromium.org> Commit-Queue: Paolo Severini <paolosev@microsoft.com> Reviewed-by: Daniel Lehmann <dlehmann@chromium.org> Cr-Commit-Position: refs/heads/main@{#95204} | 1 年前 | |
[shadow stack] Build shadow stack in deoptimization Deoptimizer builds stack frames including return addresses, but shadow stack does not have the added return addresses. Therefore, it causes security exception due to the mismatch when CET shadow stack is enabled. This CL builds a valid shadow stack during the deoptimization. AdaptShadowStackForDeopt, which is called at the end DeoptimizationEntry, jumps to the previous instruction of each return address which is call AdaptShadowStackForDeopt. Therefore, it recursively pushes the return address onto the shadow stack. This implementation is based on the following doc. https://docs.google.com/presentation/d/1maphEn0mDldQkbbYnvv13dxl9BbHNwq0Q6iTXrkd_Iw Also, since we push the addresses onto the stack, and jump to them while building shadow stack, we must validate the addresses to prevent attackers from using this code and jumping to arbitrary code. This CL reuses IsValidReturnAddress in deoptimizer-cfi-builtins. It makes a crash if it's not one of the addresses in the allow list. WASM deopt is not supported yet in this CL. Bug: chromium:42201233 Change-Id: I93acd2279838f225de562509ae6660c0759cda67 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5855923 Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Stephen Röttger <sroettger@google.com> Commit-Queue: Choongwoo Han <choongwoo.han@microsoft.com> Cr-Commit-Position: refs/heads/main@{#96965} | 1 年前 | |
[shadow stack] Build shadow stack in deoptimization Deoptimizer builds stack frames including return addresses, but shadow stack does not have the added return addresses. Therefore, it causes security exception due to the mismatch when CET shadow stack is enabled. This CL builds a valid shadow stack during the deoptimization. AdaptShadowStackForDeopt, which is called at the end DeoptimizationEntry, jumps to the previous instruction of each return address which is call AdaptShadowStackForDeopt. Therefore, it recursively pushes the return address onto the shadow stack. This implementation is based on the following doc. https://docs.google.com/presentation/d/1maphEn0mDldQkbbYnvv13dxl9BbHNwq0Q6iTXrkd_Iw Also, since we push the addresses onto the stack, and jump to them while building shadow stack, we must validate the addresses to prevent attackers from using this code and jumping to arbitrary code. This CL reuses IsValidReturnAddress in deoptimizer-cfi-builtins. It makes a crash if it's not one of the addresses in the allow list. WASM deopt is not supported yet in this CL. Bug: chromium:42201233 Change-Id: I93acd2279838f225de562509ae6660c0759cda67 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5855923 Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Stephen Röttger <sroettger@google.com> Commit-Queue: Choongwoo Han <choongwoo.han@microsoft.com> Cr-Commit-Position: refs/heads/main@{#96965} | 1 年前 | |
[shadow stack] Build shadow stack in deoptimization Deoptimizer builds stack frames including return addresses, but shadow stack does not have the added return addresses. Therefore, it causes security exception due to the mismatch when CET shadow stack is enabled. This CL builds a valid shadow stack during the deoptimization. AdaptShadowStackForDeopt, which is called at the end DeoptimizationEntry, jumps to the previous instruction of each return address which is call AdaptShadowStackForDeopt. Therefore, it recursively pushes the return address onto the shadow stack. This implementation is based on the following doc. https://docs.google.com/presentation/d/1maphEn0mDldQkbbYnvv13dxl9BbHNwq0Q6iTXrkd_Iw Also, since we push the addresses onto the stack, and jump to them while building shadow stack, we must validate the addresses to prevent attackers from using this code and jumping to arbitrary code. This CL reuses IsValidReturnAddress in deoptimizer-cfi-builtins. It makes a crash if it's not one of the addresses in the allow list. WASM deopt is not supported yet in this CL. Bug: chromium:42201233 Change-Id: I93acd2279838f225de562509ae6660c0759cda67 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5855923 Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Stephen Röttger <sroettger@google.com> Commit-Queue: Choongwoo Han <choongwoo.han@microsoft.com> Cr-Commit-Position: refs/heads/main@{#96965} | 1 年前 | |
[snapshot] Allow larger code alignments Change-Id: Ic3554c7928ffa4773b67744514eaff698569a422 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7167627 Reviewed-by: Jakob Linke <jgruber@chromium.org> Commit-Queue: Kasper Lund <kasperl@rivosinc.com> Cr-Commit-Position: refs/heads/main@{#103789} | 7 个月前 | |
[builtins] Remove indirection for pointers to code and data blobs Mark the labels to the code and data global, which removes the need for having separate pointers to these labels in the .data section. This means that v8_Default_embedded_blob_code_ and v8_Default_embedded_blob_data_ can now actually be read-only when RELRO is enabled. The actual contents of v8_Default_embedded_blob_code_ remain potentially non-readable for platforms where code is marked as execute-only, but these changes do not attempt to read them. Bug: v8:12850 Change-Id: Ic1bc8e68fe44a9ce45380c83b0be5fa94e7da267 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3616510 Commit-Queue: Georgia Kouveli <georgia.kouveli@arm.com> Reviewed-by: Jakob Linke <jgruber@chromium.org> Cr-Commit-Position: refs/heads/main@{#80331} | 4 年前 | |
Reland "[arm64][builtins] Ensure remapping works on non-4k linux systems" This is a reland of commit 772bef674c5a7972f0d33817a6a0de25add8e609 Original change's description: > [arm64][builtins] Ensure remapping works on non-4k linux systems > > This ensures that we align builtins to the largest possible size on > Linux (64k) and Android (16k), so that remapping them works regardless > of the runtime OS page size. > > We should note that we cannot rely on the V8_OS_ANDROID macro as > targeting Android means we're cross-compiling. We have to rely on the > runtime --target_os=android flag instead. > > Change-Id: I093fe8f4371b7e994f0b63a0ee7c6064e8f85747 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7013751 > Reviewed-by: Jakob Linke <jgruber@chromium.org> > Reviewed-by: Leszek Swirski <leszeks@chromium.org> > Commit-Queue: Pierre Langlois <pierre.langlois@arm.com> > Cr-Commit-Position: refs/heads/main@{#103157} Change-Id: I26c7a52da1b7406570fd0be018e885e79be428d9 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7046404 Reviewed-by: Jakob Linke <jgruber@chromium.org> Auto-Submit: Pierre Langlois <pierre.langlois@arm.com> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Pierre Langlois <pierre.langlois@arm.com> Commit-Queue: Jakob Linke <jgruber@chromium.org> Cr-Commit-Position: refs/heads/main@{#103215} | 8 个月前 | |
Reland "[arm64][builtins] Ensure remapping works on non-4k linux systems" This is a reland of commit 772bef674c5a7972f0d33817a6a0de25add8e609 Original change's description: > [arm64][builtins] Ensure remapping works on non-4k linux systems > > This ensures that we align builtins to the largest possible size on > Linux (64k) and Android (16k), so that remapping them works regardless > of the runtime OS page size. > > We should note that we cannot rely on the V8_OS_ANDROID macro as > targeting Android means we're cross-compiling. We have to rely on the > runtime --target_os=android flag instead. > > Change-Id: I093fe8f4371b7e994f0b63a0ee7c6064e8f85747 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7013751 > Reviewed-by: Jakob Linke <jgruber@chromium.org> > Reviewed-by: Leszek Swirski <leszeks@chromium.org> > Commit-Queue: Pierre Langlois <pierre.langlois@arm.com> > Cr-Commit-Position: refs/heads/main@{#103157} Change-Id: I26c7a52da1b7406570fd0be018e885e79be428d9 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7046404 Reviewed-by: Jakob Linke <jgruber@chromium.org> Auto-Submit: Pierre Langlois <pierre.langlois@arm.com> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Pierre Langlois <pierre.langlois@arm.com> Commit-Queue: Jakob Linke <jgruber@chromium.org> Cr-Commit-Position: refs/heads/main@{#103215} | 8 个月前 | |
2026.03.30 arkweb_144代码蓝黄同步 Signed-off-by: jiujiaoxiaogula <sujiahao10@huawei.com> Change-Id: I00194d339064f999dedfc211cd5af5501cbed0fb | 3 个月前 | |
Reland "[arm64][builtins] Ensure remapping works on non-4k linux systems" This is a reland of commit 772bef674c5a7972f0d33817a6a0de25add8e609 Original change's description: > [arm64][builtins] Ensure remapping works on non-4k linux systems > > This ensures that we align builtins to the largest possible size on > Linux (64k) and Android (16k), so that remapping them works regardless > of the runtime OS page size. > > We should note that we cannot rely on the V8_OS_ANDROID macro as > targeting Android means we're cross-compiling. We have to rely on the > runtime --target_os=android flag instead. > > Change-Id: I093fe8f4371b7e994f0b63a0ee7c6064e8f85747 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7013751 > Reviewed-by: Jakob Linke <jgruber@chromium.org> > Reviewed-by: Leszek Swirski <leszeks@chromium.org> > Commit-Queue: Pierre Langlois <pierre.langlois@arm.com> > Cr-Commit-Position: refs/heads/main@{#103157} Change-Id: I26c7a52da1b7406570fd0be018e885e79be428d9 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7046404 Reviewed-by: Jakob Linke <jgruber@chromium.org> Auto-Submit: Pierre Langlois <pierre.langlois@arm.com> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Pierre Langlois <pierre.langlois@arm.com> Commit-Queue: Jakob Linke <jgruber@chromium.org> Cr-Commit-Position: refs/heads/main@{#103215} | 8 个月前 | |
[snapshot] Allow larger code alignments Change-Id: Ic3554c7928ffa4773b67744514eaff698569a422 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7167627 Reviewed-by: Jakob Linke <jgruber@chromium.org> Commit-Queue: Kasper Lund <kasperl@rivosinc.com> Cr-Commit-Position: refs/heads/main@{#103789} | 7 个月前 | |
[builtins] Remove indirection for pointers to code and data blobs Mark the labels to the code and data global, which removes the need for having separate pointers to these labels in the .data section. This means that v8_Default_embedded_blob_code_ and v8_Default_embedded_blob_data_ can now actually be read-only when RELRO is enabled. The actual contents of v8_Default_embedded_blob_code_ remain potentially non-readable for platforms where code is marked as execute-only, but these changes do not attempt to read them. Bug: v8:12850 Change-Id: Ic1bc8e68fe44a9ce45380c83b0be5fa94e7da267 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3616510 Commit-Queue: Georgia Kouveli <georgia.kouveli@arm.com> Reviewed-by: Jakob Linke <jgruber@chromium.org> Cr-Commit-Position: refs/heads/main@{#80331} | 4 年前 | |
[snapshot] Allow larger code alignments Change-Id: Ic3554c7928ffa4773b67744514eaff698569a422 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7167627 Reviewed-by: Jakob Linke <jgruber@chromium.org> Commit-Queue: Kasper Lund <kasperl@rivosinc.com> Cr-Commit-Position: refs/heads/main@{#103789} | 7 个月前 | |
[builtins] Remove indirection for pointers to code and data blobs Mark the labels to the code and data global, which removes the need for having separate pointers to these labels in the .data section. This means that v8_Default_embedded_blob_code_ and v8_Default_embedded_blob_data_ can now actually be read-only when RELRO is enabled. The actual contents of v8_Default_embedded_blob_code_ remain potentially non-readable for platforms where code is marked as execute-only, but these changes do not attempt to read them. Bug: v8:12850 Change-Id: Ic1bc8e68fe44a9ce45380c83b0be5fa94e7da267 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3616510 Commit-Queue: Georgia Kouveli <georgia.kouveli@arm.com> Reviewed-by: Jakob Linke <jgruber@chromium.org> Cr-Commit-Position: refs/heads/main@{#80331} | 4 年前 | |
zos: add support for z/OS The following changes are required to build V8 on z/OS s390x platform. These changes are added on top of the currently supported s390 port of V8. All changes are guarded by V8_OS_ZOS or __MVS__, except in sampler.cc, embedded-file-writer.h, and the moving of macros from assembler-s390.h to constants-s390.h, as described below. Changes include: 1) Download dependency and build: a) DEPS - Download dependency https://github.com/ibmruntimes/zoslib into third_party/zoslib. - Skip fetching certain packages (ninja, luci-go, etc.) as there's no z/OS binary for them upstream. b) BUILD.gn - Build zoslib, exclude NA source and compiler options, and add z/OS-specific source files to the build. 2) Define macros, constants and includes: a) include/v8config.h - Include zos-base.h and define V8_OS_ZOS, V8_OS_STRING, and V8_OS_POSIX; zos-base.h is from third_party/zoslib/. b) src/d8/d8-posix.cc - Exclude NA header. 3) Platform: a) src/base/platform/platform-posix.cc - Implement GetCurrentThreadId(). - Set stack size before starting thread. - Change for pthread_t being a struct, not int. - Exclude NA static functions and headers. b) src/base/platform/platform-zos.cc - New file, implements PosixMemoryMappedFile class, OS::Allocate(), OS::Free(), etc. c) src/heap/base/asm/zos/push_registers_asm.cc - New file, implements PushAllRegistersAndIterateStack() for z/OS. d) src/base/debug/stack_trace_zos.cc: - New file, implements StackTrace class methods and stack dumping signals thread and handler for z/OS. e) src/base/platform/time.cc - Use clock_gettime() in ClockNow(), and ClockNow() in ThreadTicks::Now(). - Return true in ThreadTicks::IsSupported(). f) src/base/sys-info.cc - Implement NumberOfProcessors() and AmountOfPhysicalMemory() using API from zoslib. 4) Snapshot: a) src/snapshot/embedded/embedded-file-writer.cc src/snapshot/embedded/embedded-file-writer.h - Update WriteBinaryContentsAsInlineAssembly() so a line doesn't exceed the max length of 72, a z/OS requirement for HLASM, and define DeclareLabelProlog() and DeclareLabelEpilogue() for the embedded blob code and data symbols. b) src/snapshot/embedded/platform-embedded-file-writer-zos.cc src/snapshot/embedded/platform-embedded-file-writer-zos.h - New files, implements embedded file writer for z/OS. c) src/snapshot/embedded/platform-embedded-file-writer-base.h src/snapshot/embedded/platform-embedded-file-writer-base.cc - Include src/snapshot/embedded/platform-embedded-file-writer-zos.h, define EmbeddedTargetOs::kZOS and update NewPlatformEmbeddedFileWriter() if embedded target is z/OS. d) src/snapshot/embedded/embedded-file-writer.h - Replace "wb" by "w" in open of embedded.S Ref: https://chromium-review.googlesource.com/c/v8/v8/+/5558534/comment/ab5f65b7_ede704b3/ 5) Codegen: a) src/codegen/s390/constants-s390.h src/codegen/s390/macro-assembler-s390.cc src/codegen/s390/macro-assembler-s390.h src/codegen/s390/register-s390.h src/codegen/s390/assembler-s390.cc src/codegen/s390/assembler-s390.h src/compiler/backend/s390/code-generator-s390.cc - Call JS code using a function descriptor as required on z/OS. - Support XPLINK ABI in builtins for z/OS; shuffle XPLINK arguments coming from C to JS arguments. Add support for calling z/OS XPLINK C/C++ from JS codegen. - Enable support for native regexp codegen for z/OS. Arguments are shuffled from z/OS XPLINK ABI to LoZ ABI on function entry and vice versa on return. - Implement supportsCPUFeature(), supportsSTFLE() and ProbeImpl(). - Handle nop pseudo instructions for basr, bras, brasl call types. - Move define of ABI_USES_FUNCTION_DESCRIPTORS (1 for z/OS, 0 LoZ) and related macros from assembler-s390.h to constants-s390.h, so that for z/OS they're defined when checked, as in simulator.h (which includes simulator-s390.h that includes constants-s390.h). b) src/diagnostics/objects-debug.cc - Don't check for instruction start alignment, as no code alignment is required on z/OS. The start of each function and labels are aligned on a half-word binary. 6) Execution: a) src/execution/execution.cc - Save LE stack pointer to restore on signal while in JS. b) src/execution/isolate.cc - Allow more overflow stack space as z/OS XPLINK uses larger frames. - Ensure thread has enough stack guard. c) src/execution/simulator.h - Create a pseudo function descriptor to ensure correct dispatch to generated code. 7) Regexp: a) src/regexp/s390/regexp-macro-assembler-s390.cc - Enable regexp support: - Add support for native regexp codegen. - Shuffle arguments from z/OS XPLINK ABI to LoZ ABI on function entry and vice versa on return. 8) Builtins: a) src/builtins/s390/builtins-s390.cc - Add support for XPLINK ABI in builtins: - Add support for shuffling XPLINK arguments coming from C to JS. - Add support for calling z/OS XPLINK C/C++ from JS codegen. 9) Adjust for pthread_t being a struct (not int): a) src/base/platform/platform.h src/libsampler/sampler.h 10) libsampler: a) src/libsampler/sampler.cc - Implement FillRegisterState() to set the state's registers (pc, sp, fp, lr) with the given context in the signal handler. - Adjust for pthread_t being a struct (not int); new vm_tself() returns pthread_self() for use in pthread_kill(); also change vm_tid() to return int using base::OS::GetCurrentThreadId(). 11) tools: a) tools/testrunner/local/statusfile.py - Add "zos" to VARIABLES. b) tools/testrunner/local/utils.py - Return "zos" in GuessOS() if platform.system() is "OS/390" - Uupdate IsS390SimdSupported() to return true on z13 or higher. 12) test: a) test/cctest/cctest-utils.h test/unittests/test-utils.h - Define GET_STACK_POINTER_TO(sp_addr) macro for z/OS. Co-Authored-By: CW Cheung <ccw.280231@ca.ibm.com> Co-Authored-By: Igor Todorovski <itodorov@ca.ibm.com> Co-Authored-By: Wayne Zhang <Shuowang.Zhang@ibm.com> Bug: 42203045 Change-Id: I84a0743108918847e3bcf6d4f3b87e2205822f8c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5558534 Reviewed-by: Milad Farazmand <mfarazma@redhat.com> Commit-Queue: Milad Farazmand <mfarazma@redhat.com> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#94711} | 1 年前 | |
zos: add support for z/OS The following changes are required to build V8 on z/OS s390x platform. These changes are added on top of the currently supported s390 port of V8. All changes are guarded by V8_OS_ZOS or __MVS__, except in sampler.cc, embedded-file-writer.h, and the moving of macros from assembler-s390.h to constants-s390.h, as described below. Changes include: 1) Download dependency and build: a) DEPS - Download dependency https://github.com/ibmruntimes/zoslib into third_party/zoslib. - Skip fetching certain packages (ninja, luci-go, etc.) as there's no z/OS binary for them upstream. b) BUILD.gn - Build zoslib, exclude NA source and compiler options, and add z/OS-specific source files to the build. 2) Define macros, constants and includes: a) include/v8config.h - Include zos-base.h and define V8_OS_ZOS, V8_OS_STRING, and V8_OS_POSIX; zos-base.h is from third_party/zoslib/. b) src/d8/d8-posix.cc - Exclude NA header. 3) Platform: a) src/base/platform/platform-posix.cc - Implement GetCurrentThreadId(). - Set stack size before starting thread. - Change for pthread_t being a struct, not int. - Exclude NA static functions and headers. b) src/base/platform/platform-zos.cc - New file, implements PosixMemoryMappedFile class, OS::Allocate(), OS::Free(), etc. c) src/heap/base/asm/zos/push_registers_asm.cc - New file, implements PushAllRegistersAndIterateStack() for z/OS. d) src/base/debug/stack_trace_zos.cc: - New file, implements StackTrace class methods and stack dumping signals thread and handler for z/OS. e) src/base/platform/time.cc - Use clock_gettime() in ClockNow(), and ClockNow() in ThreadTicks::Now(). - Return true in ThreadTicks::IsSupported(). f) src/base/sys-info.cc - Implement NumberOfProcessors() and AmountOfPhysicalMemory() using API from zoslib. 4) Snapshot: a) src/snapshot/embedded/embedded-file-writer.cc src/snapshot/embedded/embedded-file-writer.h - Update WriteBinaryContentsAsInlineAssembly() so a line doesn't exceed the max length of 72, a z/OS requirement for HLASM, and define DeclareLabelProlog() and DeclareLabelEpilogue() for the embedded blob code and data symbols. b) src/snapshot/embedded/platform-embedded-file-writer-zos.cc src/snapshot/embedded/platform-embedded-file-writer-zos.h - New files, implements embedded file writer for z/OS. c) src/snapshot/embedded/platform-embedded-file-writer-base.h src/snapshot/embedded/platform-embedded-file-writer-base.cc - Include src/snapshot/embedded/platform-embedded-file-writer-zos.h, define EmbeddedTargetOs::kZOS and update NewPlatformEmbeddedFileWriter() if embedded target is z/OS. d) src/snapshot/embedded/embedded-file-writer.h - Replace "wb" by "w" in open of embedded.S Ref: https://chromium-review.googlesource.com/c/v8/v8/+/5558534/comment/ab5f65b7_ede704b3/ 5) Codegen: a) src/codegen/s390/constants-s390.h src/codegen/s390/macro-assembler-s390.cc src/codegen/s390/macro-assembler-s390.h src/codegen/s390/register-s390.h src/codegen/s390/assembler-s390.cc src/codegen/s390/assembler-s390.h src/compiler/backend/s390/code-generator-s390.cc - Call JS code using a function descriptor as required on z/OS. - Support XPLINK ABI in builtins for z/OS; shuffle XPLINK arguments coming from C to JS arguments. Add support for calling z/OS XPLINK C/C++ from JS codegen. - Enable support for native regexp codegen for z/OS. Arguments are shuffled from z/OS XPLINK ABI to LoZ ABI on function entry and vice versa on return. - Implement supportsCPUFeature(), supportsSTFLE() and ProbeImpl(). - Handle nop pseudo instructions for basr, bras, brasl call types. - Move define of ABI_USES_FUNCTION_DESCRIPTORS (1 for z/OS, 0 LoZ) and related macros from assembler-s390.h to constants-s390.h, so that for z/OS they're defined when checked, as in simulator.h (which includes simulator-s390.h that includes constants-s390.h). b) src/diagnostics/objects-debug.cc - Don't check for instruction start alignment, as no code alignment is required on z/OS. The start of each function and labels are aligned on a half-word binary. 6) Execution: a) src/execution/execution.cc - Save LE stack pointer to restore on signal while in JS. b) src/execution/isolate.cc - Allow more overflow stack space as z/OS XPLINK uses larger frames. - Ensure thread has enough stack guard. c) src/execution/simulator.h - Create a pseudo function descriptor to ensure correct dispatch to generated code. 7) Regexp: a) src/regexp/s390/regexp-macro-assembler-s390.cc - Enable regexp support: - Add support for native regexp codegen. - Shuffle arguments from z/OS XPLINK ABI to LoZ ABI on function entry and vice versa on return. 8) Builtins: a) src/builtins/s390/builtins-s390.cc - Add support for XPLINK ABI in builtins: - Add support for shuffling XPLINK arguments coming from C to JS. - Add support for calling z/OS XPLINK C/C++ from JS codegen. 9) Adjust for pthread_t being a struct (not int): a) src/base/platform/platform.h src/libsampler/sampler.h 10) libsampler: a) src/libsampler/sampler.cc - Implement FillRegisterState() to set the state's registers (pc, sp, fp, lr) with the given context in the signal handler. - Adjust for pthread_t being a struct (not int); new vm_tself() returns pthread_self() for use in pthread_kill(); also change vm_tid() to return int using base::OS::GetCurrentThreadId(). 11) tools: a) tools/testrunner/local/statusfile.py - Add "zos" to VARIABLES. b) tools/testrunner/local/utils.py - Return "zos" in GuessOS() if platform.system() is "OS/390" - Uupdate IsS390SimdSupported() to return true on z13 or higher. 12) test: a) test/cctest/cctest-utils.h test/unittests/test-utils.h - Define GET_STACK_POINTER_TO(sp_addr) macro for z/OS. Co-Authored-By: CW Cheung <ccw.280231@ca.ibm.com> Co-Authored-By: Igor Todorovski <itodorov@ca.ibm.com> Co-Authored-By: Wayne Zhang <Shuowang.Zhang@ibm.com> Bug: 42203045 Change-Id: I84a0743108918847e3bcf6d4f3b87e2205822f8c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5558534 Reviewed-by: Milad Farazmand <mfarazma@redhat.com> Commit-Queue: Milad Farazmand <mfarazma@redhat.com> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#94711} | 1 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 7 个月前 | ||
| 4 年前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 3 个月前 | ||
| 8 个月前 | ||
| 7 个月前 | ||
| 4 年前 | ||
| 7 个月前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 1 年前 |