diff --git a/repos/libports/run/memcpy.run b/repos/libports/run/memcpy.run index ec345adfe8..dd65d2380c 100644 --- a/repos/libports/run/memcpy.run +++ b/repos/libports/run/memcpy.run @@ -45,7 +45,7 @@ append qemu_args " -nographic " proc run_test {name serial_id} { run_genode_until "start $name.*\n" 20 $serial_id set t1 [clock milliseconds] - run_genode_until "finished $name.*\n" 180 $serial_id + run_genode_until "finished $name.*\n" 300 $serial_id set t2 [clock milliseconds] return [expr {$t2 - $t1}] } @@ -54,12 +54,14 @@ run_genode_until "Memcpy testsuite started.*\n" 60 set serial_id [output_spawn_id] set byte_dur [run_test "bytewise memcpy" $serial_id] set genode_dur [run_test "Genode memcpy" $serial_id] +set genode_set_dur [run_test "Genode memset" $serial_id] set libc_cpy_dur [run_test "libc memcpy" $serial_id] set libc_set_dur [run_test "libc memset" $serial_id] set uncached_wr_dur [run_test "Genode memcpy" $serial_id] set uncached_rd_dur [run_test "Genode memcpy" $serial_id] puts "bytewise: copied 8 GB in $byte_dur milliseconds ([expr {8192000 / $byte_dur}] MiB/sec)" puts "memcpy: copied 8 GB in $genode_dur milliseconds ([expr {8192000 / $genode_dur}] MiB/sec)" +puts "memset: copied 8 GB in $genode_set_dur milliseconds ([expr {8192000 / $genode_set_dur}] MiB/sec)" puts "libc memcpy: copied 8 GB in $libc_cpy_dur milliseconds ([expr {8192000 / $libc_cpy_dur}] MiB/sec)" puts "libc memset: copied 8 GB in $libc_set_dur milliseconds ([expr {8192000 / $libc_set_dur}] MiB/sec)" puts "memcpy (uncached write): copied 8 GB in $uncached_wr_dur milliseconds ([expr {8192000 / $uncached_wr_dur}] MiB/sec)" diff --git a/repos/libports/src/test/memcpy/main.cc b/repos/libports/src/test/memcpy/main.cc index 13484e60f9..ff0caa600d 100644 --- a/repos/libports/src/test/memcpy/main.cc +++ b/repos/libports/src/test/memcpy/main.cc @@ -27,6 +27,15 @@ struct Genode_cpy_test { Genode::memcpy(dst, src, size); } }; +struct Genode_set_test { + + void start() { log("start Genode memset"); } + void finished() { log("finished Genode memset"); } + + void copy(void *dst, const void *, size_t size) { + Genode::memset(dst, 0, size); } +}; + struct Libc_cpy_test { void start() { log("start libc memcpy"); } @@ -51,6 +60,7 @@ void Libc::Component::construct(Libc::Env &env) memcpy_test(); memcpy_test(); + memcpy_test(); memcpy_test(); memcpy_test();