diff options
author | Siddhesh Poyarekar <siddhesh@redhat.com> | 2013-10-11 22:37:53 +0530 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@redhat.com> | 2013-10-11 22:37:53 +0530 |
commit | 10e1cf6b73f1598e57d24933a0949dbeffa2c8a0 (patch) | |
tree | 2dd2ce2fe7144de439047f6dddbeb2f660746d94 /sysdeps/ieee754/dbl-64/slowexp.c | |
parent | 3d110c7c6e6549bd4124fce49cdc672f9e449799 (diff) | |
download | glibc-10e1cf6b73f1598e57d24933a0949dbeffa2c8a0.tar.gz glibc-10e1cf6b73f1598e57d24933a0949dbeffa2c8a0.tar.xz glibc-10e1cf6b73f1598e57d24933a0949dbeffa2c8a0.zip |
Add systemtap markers to math function slow paths
Add systemtap probes to various slow paths in libm so that application developers may use systemtap to find out if their applications are hitting these slow paths. We have added probes for pow, exp, log, tan, atan and atan2.
Diffstat (limited to 'sysdeps/ieee754/dbl-64/slowexp.c')
-rw-r--r-- | sysdeps/ieee754/dbl-64/slowexp.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sysdeps/ieee754/dbl-64/slowexp.c b/sysdeps/ieee754/dbl-64/slowexp.c index 8f353f634f..525224f44a 100644 --- a/sysdeps/ieee754/dbl-64/slowexp.c +++ b/sysdeps/ieee754/dbl-64/slowexp.c @@ -29,6 +29,8 @@ /**************************************************************************/ #include <math_private.h> +#include <stap-probe.h> + #ifndef USE_LONG_DOUBLE_FOR_MP # include "mpa.h" void __mpexp (mp_no *x, mp_no *y, int p); @@ -60,13 +62,22 @@ __slowexp (double x) __mp_dbl (&mpw, &w, p); __mp_dbl (&mpz, &z, p); if (w == z) - return w; + { + /* Track how often we get to the slow exp code plus + its input/output values. */ + LIBC_PROBE (slowexp_p6, 2, &x, &w); + return w; + } else { p = 32; __dbl_mp (x, &mpx, p); __mpexp (&mpx, &mpy, p); __mp_dbl (&mpy, &res, p); + + /* Track how often we get to the uber-slow exp code plus + its input/output values. */ + LIBC_PROBE (slowexp_p32, 2, &x, &res); return res; } #else |