bench-memcpy: Collect data from 2KB to 4KB

Message ID 20210430171522.3608387-1-hjl.tools@gmail.com
State Committed
Commit 98544f5bcf1bef9311463ded60ddd3941c75a547
Headers
Series bench-memcpy: Collect data from 2KB to 4KB |

Commit Message

H.J. Lu April 30, 2021, 5:15 p.m. UTC
  Collect data on memcpy from 2KB to 4KB with the 64-byte increment value.
---
 benchtests/bench-memcpy.c | 8 ++++++++
 1 file changed, 8 insertions(+)
  

Comments

H.J. Lu May 1, 2021, 1:45 p.m. UTC | #1
On Fri, Apr 30, 2021 at 10:20 AM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> Collect data on memcpy from 2KB to 4KB with the 64-byte increment value.
> ---
>  benchtests/bench-memcpy.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/benchtests/bench-memcpy.c b/benchtests/bench-memcpy.c
> index 5bddaeb8fc..184495d539 100644
> --- a/benchtests/bench-memcpy.c
> +++ b/benchtests/bench-memcpy.c
> @@ -145,6 +145,14 @@ test_main (void)
>
>    do_test (&json_ctx, 0, 0, getpagesize ());
>
> +  for (i = 0; i <= 32; ++i)
> +    {
> +      do_test (&json_ctx, 0, 0, 2048 + 64 * i);
> +      do_test (&json_ctx, i, 0, 2048 + 64 * i);
> +      do_test (&json_ctx, 0, i, 2048 + 64 * i);
> +      do_test (&json_ctx, i, i, 2048 + 64 * i);
> +    }
> +
>    json_array_end (&json_ctx);
>    json_attr_object_end (&json_ctx);
>    json_attr_object_end (&json_ctx);
> --
> 2.31.1
>

If there are no objections, I will check it in next week.

Thanks.
  
Tulio Magno Quites Machado Filho May 3, 2021, 3:04 p.m. UTC | #2
"H.J. Lu via Libc-alpha" <libc-alpha@sourceware.org> writes:

> Collect data on memcpy from 2KB to 4KB with the 64-byte increment value.

LGTM.
  

Patch

diff --git a/benchtests/bench-memcpy.c b/benchtests/bench-memcpy.c
index 5bddaeb8fc..184495d539 100644
--- a/benchtests/bench-memcpy.c
+++ b/benchtests/bench-memcpy.c
@@ -145,6 +145,14 @@  test_main (void)
 
   do_test (&json_ctx, 0, 0, getpagesize ());
 
+  for (i = 0; i <= 32; ++i)
+    {
+      do_test (&json_ctx, 0, 0, 2048 + 64 * i);
+      do_test (&json_ctx, i, 0, 2048 + 64 * i);
+      do_test (&json_ctx, 0, i, 2048 + 64 * i);
+      do_test (&json_ctx, i, i, 2048 + 64 * i);
+    }
+
   json_array_end (&json_ctx);
   json_attr_object_end (&json_ctx);
   json_attr_object_end (&json_ctx);