2022-03-29 Brandon Stewart Rename Libpas README to README.md https://bugs.webkit.org/show_bug.cgi?id=238517 Reviewed by Yusuke Suzuki. Libpas README does not correctly display markdown output on github.com without .md file extension. * libpas/ReadMe.md: Renamed from Source/bmalloc/libpas/README. 2022-03-26 Yusuke Suzuki Use unary static_assert https://bugs.webkit.org/show_bug.cgi?id=238412 Reviewed by Mark Lam. * bmalloc/Algorithm.h: (bmalloc::isPowerOfTwo): * bmalloc/Gigacage.h: * bmalloc/IsoHeapImpl.h: 2022-03-21 Alex Christensen Dust off Mac CMake build https://bugs.webkit.org/show_bug.cgi?id=238121 Reviewed by Yusuke Suzuki. * PlatformMac.cmake: 2022-03-15 Mark Lam Remove unused directory local variable in pas_enumerate_segregated_heaps. https://bugs.webkit.org/show_bug.cgi?id=237931 Reviewed by Geoffrey Garen. Also remove the call to pas_unwrap_local_view_cache_node(). It doesn't add any value. The only thing of substance that it does is a PAS_ASSERT that turns out to be redundant because pas_enumerate_segregated_heaps() already asserts the same thing before calling pas_unwrap_local_view_cache_node(). * libpas/src/libpas/pas_enumerate_segregated_heaps.c: (pas_enumerate_segregated_heaps): 2022-03-14 Elliott Williams bmalloc.xcodeproj: Remove duplicate file reference https://bugs.webkit.org/show_bug.cgi?id=237845 Reviewed by Simon Fraser. pas_thread_local_cache_layout_node_kind.h was listed twice in the same group, probably due to a merge conflict resolution typo. Dedupe it. * bmalloc.xcodeproj/project.pbxproj: 2022-03-12 Tim Horton Adopt FALLBACK_PLATFORM_NAME in place of FALLBACK_PLATFORM https://bugs.webkit.org/show_bug.cgi?id=237809 Reviewed by Per Arne Vollan. * Configurations/SDKVariant.xcconfig: 2022-03-11 Yusuke Suzuki Unreviewed, ASan specific build fix https://bugs.webkit.org/show_bug.cgi?id=237572 * libpas/src/libpas/pas_utils.h: (pas_zero_memory): 2022-03-09 Yusuke Suzuki [libpas] We should gurantee that in-flux-stash is fully baked when pointing table is set https://bugs.webkit.org/show_bug.cgi?id=237697 rdar://89116983 Reviewed by Mark Lam. To support enumerating hashtable which can be in the middle of resizing, we have in-flux-stash: this small stash is used to keep old table and size while resizing. However, Mark pointed that pas_tiny_large_map_hashtable_for_each_entry_remote's assertion is firing, which is ensuring that table's underlying pointer should be NULL when the size is 0. But in-flux-stash, we did not guarantee that in-flux-stash data is consistent when it is exposed to the enumerator (when setting hashtable_being_resized). This patch inserts pas_compiler_fence when exposing and unexposing in-flux-stash. pas_compiler_fence is enough (pas_store_store_fence is not necessary) because pas_enumerator runs after suspending the process. Thus, data structure's consistency between instruction boundary is enough. * libpas/src/libpas/pas_hashtable.h: 2022-03-08 Yusuke Suzuki [libpas] Report more actionable crash in pas_enumerator https://bugs.webkit.org/show_bug.cgi?id=237572 Reviewed by Saam Barati. 1. Adds PAS_ASSERT_WITH_DETAIL, which can report more detailed crash information than PAS_ASSERT while it is not efficient as much as PAS_ASSERT. We use it only in pas_enumerator related code to report more actionable crash from these code. It is OK since pas_enumerator is not used usually, which will be used only when vmmap is attached. 2. Extract enumerate_large_map, enumerate_small_large_map, and enumerate_tiny_large_map to report which part of these functions can crash (in very rare case). 3. Ensure pas_thread_local_cache_create's thread_local_cache is exposed after setting up all the data. * libpas/src/libpas/pas_enumerable_range_list.c: (pas_enumerable_range_list_append): (pas_enumerable_range_list_iterate): (pas_enumerable_range_list_iterate_remote): * libpas/src/libpas/pas_enumerate_bitfit_heaps.c: (view_callback): (enumerate_bitfit_heap_callback): * libpas/src/libpas/pas_enumerate_initially_unaccounted_pages.c: (range_list_iterate_add_unaccounted_callback): (range_list_iterate_exclude_accounted_callback): * libpas/src/libpas/pas_enumerate_large_heaps.c: (range_list_iterate_add_large_payload_callback): (record_span): (large_map_hashtable_entry_callback): (small_large_map_hashtable_entry_callback): (tiny_large_map_hashtable_entry_callback): (enumerate_large_map): (enumerate_small_large_map): (enumerate_tiny_large_map): (pas_enumerate_large_heaps): * libpas/src/libpas/pas_enumerate_segregated_heaps.c: (local_allocator_map_entry_is_empty_or_deleted): (local_allocator_map_entry_is_empty): (local_allocator_map_entry_is_deleted): (collect_shared_page_directories_heap_callback): (enumerate_exclusive_view): (enumerate_shared_view): (enumerate_partial_view): (shared_page_directory_view_callback): (size_directory_view_callback): (consider_allocator): (pas_enumerate_segregated_heaps): * libpas/src/libpas/pas_enumerate_unaccounted_pages_as_meta.c: (pas_enumerate_unaccounted_pages_as_meta): * libpas/src/libpas/pas_enumerator.c: (pas_enumerator_create): (pas_enumerator_read_compact): (pas_enumerator_read): (pas_enumerator_add_unaccounted_pages): (pas_enumerator_exclude_accounted_page): (pas_enumerator_exclude_accounted_pages): (pas_enumerator_record): (pas_enumerator_record_page_payload_and_meta): * libpas/src/libpas/pas_enumerator.h: (pas_enumerator_record_kind_get_string): * libpas/src/libpas/pas_enumerator_region.c: (pas_enumerator_region_allocate): * libpas/src/libpas/pas_thread_local_cache.c: (pas_thread_local_cache_create): * libpas/src/libpas/pas_utils.c: (pas_assertion_failed_no_inline): * libpas/src/libpas/pas_utils.h: (pas_zero_memory): 2022-03-01 Basuke Suzuki [libpas] Add missing PlayStation implementation. https://bugs.webkit.org/show_bug.cgi?id=237341 Reviewed by Yusuke Suzuki. * libpas/src/libpas/pas_monotonic_time.c: (pas_get_current_monotonic_time_nanoseconds): 2022-02-25 Basuke Suzuki [libpas] Suppress cast-align warnings https://bugs.webkit.org/show_bug.cgi?id=237179 Reviewed by Yusuke Suzuki. Ignore cast-align warnings for libpas target. * CMakeLists.txt: * libpas/src/libpas/bmalloc_heap_inlines.h: 2022-02-23 Basuke Suzuki [libpas] PlayStation uses 16k page size. https://bugs.webkit.org/show_bug.cgi?id=237096 Reviewed by Yusuke Suzuki. Match the granule default size to system page size for our platform. * libpas/src/libpas/pas_internal_config.h: == Rolled over to ChangeLog-2022-02-22 ==