310 // NUMA-specific interface
311 static bool numa_has_static_binding();
312 static bool numa_has_group_homing();
313 static void numa_make_local(char *addr, size_t bytes, int lgrp_hint);
314 static void numa_make_global(char *addr, size_t bytes);
315 static size_t numa_get_groups_num();
316 static size_t numa_get_leaf_groups(int *ids, size_t size);
317 static bool numa_topology_changed();
318 static int numa_get_group_id();
319
320 // Page manipulation
321 struct page_info {
322 size_t size;
323 int lgrp_id;
324 };
325 static bool get_page_info(char *start, page_info* info);
326 static char* scan_pages(char *start, char* end, page_info* page_expected, page_info* page_found);
327
328 static char* non_memory_address_word();
329 // reserve, commit and pin the entire memory region
330 static char* reserve_memory_special(size_t size, char* addr = NULL,
331 bool executable = false);
332 static bool release_memory_special(char* addr, size_t bytes);
333 static void large_page_init();
334 static size_t large_page_size();
335 static bool can_commit_large_page_memory();
336 static bool can_execute_large_page_memory();
337
338 // OS interface to polling page
339 static address get_polling_page() { return _polling_page; }
340 static void set_polling_page(address page) { _polling_page = page; }
341 static bool is_poll_address(address addr) { return addr >= _polling_page && addr < (_polling_page + os::vm_page_size()); }
342 static void make_polling_page_unreadable();
343 static void make_polling_page_readable();
344
345 // Routines used to serialize the thread state without using membars
346 static void serialize_thread_states();
347
348 // Since we write to the serialize page from every thread, we
349 // want stores to be on unique cache lines whenever possible
350 // in order to minimize CPU cross talk. We pre-compute the
351 // amount to shift the thread* to make this offset unique to
|
310 // NUMA-specific interface
311 static bool numa_has_static_binding();
312 static bool numa_has_group_homing();
313 static void numa_make_local(char *addr, size_t bytes, int lgrp_hint);
314 static void numa_make_global(char *addr, size_t bytes);
315 static size_t numa_get_groups_num();
316 static size_t numa_get_leaf_groups(int *ids, size_t size);
317 static bool numa_topology_changed();
318 static int numa_get_group_id();
319
320 // Page manipulation
321 struct page_info {
322 size_t size;
323 int lgrp_id;
324 };
325 static bool get_page_info(char *start, page_info* info);
326 static char* scan_pages(char *start, char* end, page_info* page_expected, page_info* page_found);
327
328 static char* non_memory_address_word();
329 // reserve, commit and pin the entire memory region
330 static char* reserve_memory_special(size_t size, size_t alignment, char* addr, bool executable);
331 static bool release_memory_special(char* addr, size_t bytes);
332 static void large_page_init();
333 static size_t large_page_size();
334 static bool can_commit_large_page_memory();
335 static bool can_execute_large_page_memory();
336
337 // OS interface to polling page
338 static address get_polling_page() { return _polling_page; }
339 static void set_polling_page(address page) { _polling_page = page; }
340 static bool is_poll_address(address addr) { return addr >= _polling_page && addr < (_polling_page + os::vm_page_size()); }
341 static void make_polling_page_unreadable();
342 static void make_polling_page_readable();
343
344 // Routines used to serialize the thread state without using membars
345 static void serialize_thread_states();
346
347 // Since we write to the serialize page from every thread, we
348 // want stores to be on unique cache lines whenever possible
349 // in order to minimize CPU cross talk. We pre-compute the
350 // amount to shift the thread* to make this offset unique to
|