commit | ef1cd6fa43fe3b2a88fbc1535aa05d4019139287 | [log] [tgz] |
---|---|---|
author | chenhy0106 <42792255+chenhy0106@users.noreply.github.com> | Fri May 10 15:01:13 2024 |
committer | GitHub <noreply@github.com> | Fri May 10 15:01:13 2024 |
tree | c765fd75adf1551cafb03aa2fdc2fab04c5262b5 | |
parent | 73b6ca02c3e2e3a0bc1121709d6dc28579de8aee [diff] |
i#3544 RV64: Optimize private memcpy and memset (#6800) 1. Optimize private memcpy and memset for RV64. 2. Add test to compare private and libc memset. 3. Compare private memcpy with libc memcpy on more small sizes. 4. Fix a bug of core/CMakeLists.txt. For unit_tests, to compare private and libc memcpy, we should link unit_tests to drmemfuncs but not link to libc. Compare original memcpy&memset, optimized private memcpy&memset and glibc memcpy&memset. Test command: ``` ./bin64/unit_tests ``` When we use original memcpy and memset, outputs: ``` our_memcpy_time: size=1 time=0 libc_memcpy_time: size=1 time=2 our_memcpy_time: size=4 time=2 libc_memcpy_time: size=4 time=2 our_memcpy_time: size=128 time=16 libc_memcpy_time: size=128 time=4 our_memcpy_time: size=512 time=57 libc_memcpy_time: size=512 time=7 our_memcpy_time: size=8192 time=824 libc_memcpy_time: size=8192 time=79 our_memcpy_time: size=20480 time=2080 libc_memcpy_time: size=20480 time=183 our_memset_time: 4129 libc_memset_time: 292 io all done testing string done testing string ``` When we use optimized memcpy and memset, outputs: ``` our_memcpy_time: size=1 time=1 libc_memcpy_time: size=1 time=2 our_memcpy_time: size=4 time=1 libc_memcpy_time: size=4 time=3 our_memcpy_time: size=128 time=2 libc_memcpy_time: size=128 time=3 our_memcpy_time: size=512 time=7 libc_memcpy_time: size=512 time=7 our_memcpy_time: size=8192 time=72 libc_memcpy_time: size=8192 time=69 our_memcpy_time: size=20480 time=184 libc_memcpy_time: size=20480 time=175 our_memset_time: 307 libc_memset_time: 302 io all done testing string done testing string ``` Issue: #3544
DynamoRIO is a runtime code manipulation system that supports code transformations on any part of a program, while it executes. DynamoRIO exports an interface for building dynamic tools for a wide variety of uses: program analysis and understanding, profiling, instrumentation, optimization, translation, etc. Unlike many dynamic tool systems, DynamoRIO is not limited to insertion of callouts/trampolines and allows arbitrary modifications to application instructions via a powerful IA-32/AMD64/ARM/AArch64 instruction manipulation library. DynamoRIO provides efficient, transparent, and comprehensive manipulation of unmodified applications running on stock operating systems (Windows, Linux, or Android) and commodity IA-32, AMD64, ARM, and AArch64 hardware. Mac OSX support is in progress.
DynamoRIO is the basis for some well-known external tools:
Tools built on DynamoRIO and available in the release package include:
DynamoRIO‘s powerful API abstracts away the details of the underlying infrastructure and allows the tool builder to concentrate on analyzing or modifying the application’s runtime code stream. API documentation is included in the release package and can also be browsed online. Slides from our past tutorials are also available.
DynamoRIO is available free of charge as a binary package for both Windows and Linux. DynamoRIO's source code is available primarily under a BSD license.
Use the discussion list to ask questions.
To report a bug, use the issue tracker.
See also the DynamoRIO home page: http://dynamorio.org/