]> sourceware.org Git - glibc.git/commitdiff
benchtests: Fixed bench-memcpy-random: buf1: mprotect failed
authorNaohiro Tamura <naohirot@jp.fujitsu.com>
Wed, 12 May 2021 09:29:54 +0000 (09:29 +0000)
committerSzabolcs Nagy <szabolcs.nagy@arm.com>
Wed, 26 May 2021 11:01:06 +0000 (12:01 +0100)
This patch fixed mprotect system call failure on AArch64.
This failure happened on not only A64FX but also ThunderX2.

Also this patch updated a JSON key from "max-size" to "length" so that
'plot_strings.py' can process 'bench-memcpy-random.out'

benchtests/bench-memcpy-random.c

index 9b62033379f3022433321e571691829e6896affd..c490b73ed07bfb8287ab7a41ac2cfb7c43d1d545 100644 (file)
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
-#define MIN_PAGE_SIZE (512*1024+4096)
+#define MIN_PAGE_SIZE (512*1024+getpagesize())
 #define TEST_MAIN
 #define TEST_NAME "memcpy"
 #include "bench-string.h"
@@ -160,7 +160,7 @@ do_test (json_ctx_t *json_ctx, size_t max_size)
     }
 
   json_element_object_begin (json_ctx);
-  json_attr_uint (json_ctx, "max-size", (double) max_size);
+  json_attr_uint (json_ctx, "length", (double) max_size);
   json_array_begin (json_ctx, "timings");
 
   FOR_EACH_IMPL (impl, 0)
This page took 0.044666 seconds and 5 git commands to generate.