diff mbox series

[v2,6/6] benchtests: Fixed bench-memcpy-random: buf1: mprotect failed

Message ID 20210512092954.901342-1-naohirot@fujitsu.com
State Committed
Commit f12ec02f5389a443d892241c486d87b3c5940ff6
Headers show
Series aarch64: Added optimized memcpy/memmove/memset for A64FX | expand

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent

Commit Message

Naohiro Tamura May 12, 2021, 9:29 a.m. UTC
From: Naohiro Tamura <naohirot@jp.fujitsu.com>

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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Szabolcs Nagy May 26, 2021, 10:25 a.m. UTC | #1
The 05/12/2021 09:29, Naohiro Tamura wrote:
> From: Naohiro Tamura <naohirot@jp.fujitsu.com>
> 
> 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'

thanks, this is ok for master.
i will commit it.

> ---
>  benchtests/bench-memcpy-random.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/benchtests/bench-memcpy-random.c b/benchtests/bench-memcpy-random.c
> index 9b62033379..c490b73ed0 100644
> --- a/benchtests/bench-memcpy-random.c
> +++ b/benchtests/bench-memcpy-random.c
> @@ -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)
> -- 
> 2.17.1
> 

--
diff mbox series

Patch

diff --git a/benchtests/bench-memcpy-random.c b/benchtests/bench-memcpy-random.c
index 9b62033379..c490b73ed0 100644
--- a/benchtests/bench-memcpy-random.c
+++ b/benchtests/bench-memcpy-random.c
@@ -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)