1 diff -rup a/sysdeps/ieee754/dbl-64/slowexp.c b/sysdeps/ieee754/dbl-64/slowexp.c
2 --- a/sysdeps/ieee754/dbl-64/slowexp.c 2012-01-01 05:16:32.000000000 -0700
3 +++ b/sysdeps/ieee754/dbl-64/slowexp.c 2012-03-13 11:57:51.225330782 -0600
6 #include "math_private.h"
8 +#include <stap-probe.h>
10 void __mpexp(mp_no *x, mp_no *y, int p);
12 /*Converting from double precision to Multi-precision and calculating e^x */
13 @@ -61,12 +63,21 @@ __slowexp(double x) {
14 __sub(&mpy,&mpcor,&mpz,p);
15 __mp_dbl(&mpw, &w, p);
16 __mp_dbl(&mpz, &z, p);
17 - if (w == z) return w;
19 + /* Track how often we get to the slow exp code plus
20 + its input/output values. */
21 + LIBC_PROBE (slowexp_p6, 2, &x, &w);
24 else { /* if calculating is not exactly */
27 __mpexp(&mpx, &mpy, p);
28 __mp_dbl(&mpy, &res, p);
30 + /* Track how often we get to the uber-slow exp code plus
31 + its input/output values. */
32 + LIBC_PROBE (slowexp_p32, 2, &x, &res);
36 diff -rup a/sysdeps/ieee754/dbl-64/slowpow.c b/sysdeps/ieee754/dbl-64/slowpow.c
37 --- a/sysdeps/ieee754/dbl-64/slowpow.c 2012-01-01 05:16:32.000000000 -0700
38 +++ b/sysdeps/ieee754/dbl-64/slowpow.c 2012-03-13 11:57:59.865284437 -0600
41 #include "math_private.h"
43 +#include <stap-probe.h>
45 void __mpexp(mp_no *x, mp_no *y, int p);
46 void __mplog(mp_no *x, mp_no *y, int p);
48 @@ -66,7 +68,12 @@ __slowpow(double x, double y, double z)
49 __mp_dbl(&mpr, &res, p);
50 __sub(&mpp,&eps,&mpr1,p); /* pp -eps =r1 */
51 __mp_dbl(&mpr1, &res1, p); /* converting into double precision */
52 - if (res == res1) return res;
54 + /* Track how often we get to the slow pow code plus
55 + its input/output values. */
56 + LIBC_PROBE (slowpow_p10, 4, &x, &y, &z, &res);
60 p = 32; /* if we get here result wasn't calculated exactly, continue */
61 __dbl_mp(x,&mpx,p); /* for more exact calculation */
62 @@ -76,5 +83,10 @@ __slowpow(double x, double y, double z)
63 __mul(&mpy,&mpz,&mpw,p); /* y*z =w */
64 __mpexp(&mpw, &mpp, p); /* e^w=pp */
65 __mp_dbl(&mpp, &res, p); /* converting into double precision */
67 + /* Track how often we get to the uber-slow pow code plus
68 + its input/output values. */
69 + LIBC_PROBE (slowpow_p32, 4, &x, &y, &z, &res);