summaryrefslogtreecommitdiff
path: root/micro_bench/micro_bench.cpp
AgeCommit message (Collapse)Author
2015-01-28Add missing <string.h> include.Elliott Hughes
Change-Id: Iffdfed00ac49a7920844fa5f9e1a3ffc6a77e641
2014-03-20micro_bench: 64 bit compile issuesMark Salyzyn
- use %zu for size_t operands - suppress unused argument warning messages Change-Id: Ib39b8763414320d9e3a29408bc1b396ddb376293
2013-07-30Add cold versions of benchmarks.android-cts-4.4_r4android-4.4_r1.2.0.1android-4.4_r1.2android-4.4_r1.1.0.1android-4.4_r1.1android-4.4_r1.0.1android-4.4_r1android-4.4_r0.9android-4.4_r0.8kitkat-releasekitkat-cts-releaseChristopher Ferris
- Created macros for one and two buffer benchmarks to simplify addition of new benchmarks. - Created cold versions of all benchmarks that work on buffer benchmarks. This means that the benchmark is given buffers that are not in the cache. - Verified the cold versions are working as intended by changing it so that the same buffer is written in each loop instead of the strided buffer. Using this method, the cold and normal benchmark run at the same speed. Change-Id: Ie5d1b015dd70d3935cfa2830a82955429a2f5b3c
2013-07-10Adding strlen, strcat, strcpy benchmarks.Christopher Ferris
Change-Id: I31542ecdec95c2d1d3fb9b2795581ad4d5e13c5c
2013-06-26Add a benchmark of strcpy.Christopher Ferris
List of all changes: - Add a strcpy benchmark. - Create a macro that is used to create all of the code for the main loop of the benchmark. - Fix the strcmp benchmark to use two buffers. The single buffer was an experiment that should not have been committed. It also crashes when a large alignment is used because it hard-coded an extra 2048 allocation regardless of the alignment chosen. - Modify the libc benchmarks to take the function to bench as a parameter. This will allow us to benchmark new potential libc optimizations by adding a single line to the function table list. Change-Id: Id7129667669318acbd001c1bfa3db82764a39029
2013-04-02Add strcmp benchmarking.Christopher Ferris
NOTE: After this change memcpy results will be significantly lower for larger sized copies. Changes: - Addition of strcmp benchmarking. - Fix memcpy to initialize memory before copy. If this is not done, the results of memcpy are artificially higher. - Add a min and max when printing averages. - Add two new options --dst_or_mask and --src_or_mask to allow more flexibility when testing different alignments. Change-Id: Ia2859d5569ab5ffa35e5ac0f6d5d1f248fef6533
2013-02-15Update micro_bench.Christopher Ferris
Moving the code to cpp to access the cpuset CPU* macros (these macros are defined in sched.h inside of __USE_GNU which is not defined for the thumb C compiler). The C++ code is also slightly easier to read. Add code to set the priority of the process to the highest value. Add code to lock the process to a single cpu. Add the ability to compute average and standard deviation over a number of iterations. Change the timing code to use nanosecond resolution timing. Add options to allow modification of the alignment of the src/dst pointers for memcpy and the dst pointer for memset. Add an option to change the size of the data being copied in each iteration. Change-Id: Ib7c50ed4463f94e638eb81690fe8fe0d0bc3ea80