]> granicus.if.org Git - strace/commit
Implement memory caching for umove* functions
authorDmitry V. Levin <ldv@altlinux.org>
Sun, 15 Sep 2019 15:47:01 +0000 (15:47 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 15 Sep 2019 15:47:01 +0000 (15:47 +0000)
commite99ac2bd2b055c7804d22e3519d7ba23c8f34df8
treea948ae5008f056ea0fc50e03cdb10c26b35e7078
parent52e1c9a71dcebf4736e04de1eed90987e5b1034c
Implement memory caching for umove* functions

When the data to be fetched by vm_read_mem resides in a single memory
page, fetch the whole page and cache it.  This implementation caches
up to two memory pages.

* defs.h (invalidate_umove_cache): New prototype.
* strace.c (next_event): Call invalidate_umove_cache.
* ucopy.c (cached_idx, cached_raddr): New static variables.
(process_read_mem): New function.
(vm_read_mem): Use them.  Implement fetched page caching.
* tests/umovestr_cached.test: New test.
* tests/Makefile.am (MISC_TESTS): Add umovestr_cached.test.
* tests/umovestr_cached.c: New file.
* tests/pure_executables.list: Add umovestr_cached.
* tests/.gitignore: Likewise.
defs.h
strace.c
tests/.gitignore
tests/Makefile.am
tests/pure_executables.list
tests/umovestr_cached.c [new file with mode: 0644]
tests/umovestr_cached.test [new file with mode: 0755]
ucopy.c