| The traces in this directory are used for validating and testing |
| performance of the math library. Each file contains the input |
| arguments to the specific math functions, written in raw binary |
| format. |
| |
| exp,log,pow are collected from the Perflab benchmark |
| compiler/rephil/docs/v7 and expf is collected from |
| util/math:fastmath_unittest. |
| |
| The traces were collected by linking in a small library that wrote |
| that first 4M arguments to file before returning the actual value. |
| - Library was added as a dep to "base:base". |
| - To avoid write samples for genrules, the profiling was guarded by a |
| macro that was defined using --copt. |
| - Tcmalloc holds a lock while it calls log(), so care had to be taken |
| not to cause a deadlock in the profiling of log(). |
| For the other functions, the actual value could be calculated |
| using something like this: |
| _exp = (double (*)(double)) dlsym(RTLD_NEXT, "exp"); |
| return _exp(x); |
| for log(), we made the following call: |
| return log10(x)/log10(2.71828182846); |
| |