2012-05-23 18:18:07 +00:00
|
|
|
diff -rup c/sysdeps/ieee754/dbl-64/slowexp.c d/sysdeps/ieee754/dbl-64/slowexp.c
|
2013-06-04 16:53:45 +00:00
|
|
|
--- c/sysdeps/ieee754/dbl-64/slowexp.c 2013-06-04 16:40:55.000000000 +0530
|
|
|
|
+++ d/sysdeps/ieee754/dbl-64/slowexp.c 2013-06-04 21:02:49.377439607 +0530
|
|
|
|
@@ -29,6 +29,8 @@
|
|
|
|
/**************************************************************************/
|
2012-05-23 18:18:07 +00:00
|
|
|
#include <math_private.h>
|
2012-03-15 03:21:22 +00:00
|
|
|
|
|
|
|
+#include <stap-probe.h>
|
|
|
|
+
|
2013-06-04 16:53:45 +00:00
|
|
|
#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);
|
2012-03-15 03:21:22 +00:00
|
|
|
+
|
2013-06-04 16:53:45 +00:00
|
|
|
+ /* 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
|
2012-05-23 18:18:07 +00:00
|
|
|
diff -rup c/sysdeps/ieee754/dbl-64/slowpow.c d/sysdeps/ieee754/dbl-64/slowpow.c
|
2013-06-04 16:53:45 +00:00
|
|
|
--- c/sysdeps/ieee754/dbl-64/slowpow.c 2013-06-04 16:40:55.000000000 +0530
|
|
|
|
+++ d/sysdeps/ieee754/dbl-64/slowpow.c 2013-06-04 21:05:21.776433149 +0530
|
2012-05-23 18:18:07 +00:00
|
|
|
@@ -34,6 +34,8 @@
|
2012-03-15 03:21:22 +00:00
|
|
|
#include "mpa.h"
|
2012-05-23 18:18:07 +00:00
|
|
|
#include <math_private.h>
|
2012-03-15 03:21:22 +00:00
|
|
|
|
|
|
|
+#include <stap-probe.h>
|
|
|
|
+
|
|
|
|
#ifndef SECTION
|
|
|
|
# define SECTION
|
|
|
|
#endif
|
2013-06-04 16:53:45 +00:00
|
|
|
@@ -97,7 +99,12 @@ __slowpow (double x, double y, double z)
|
|
|
|
__sub (&mpp, &eps, &mpr1, p);
|
|
|
|
__mp_dbl (&mpr1, &res1, p);
|
|
|
|
if (res == res1)
|
|
|
|
- return res;
|
|
|
|
+ {
|
|
|
|
+ /* Track how often we get to the slow pow code plus
|
|
|
|
+ its input/output values. */
|
2013-07-25 19:46:20 +00:00
|
|
|
+ LIBC_PROBE (slowpow_p10, 4, &x, &y, &z, &res);
|
2013-06-04 16:53:45 +00:00
|
|
|
+ return res;
|
|
|
|
+ }
|
2012-03-15 03:21:22 +00:00
|
|
|
|
2013-06-04 16:53:45 +00:00
|
|
|
/* If we don't, then we repeat using a higher precision. 768 bits of
|
|
|
|
precision ought to be enough for anybody. */
|
|
|
|
@@ -109,5 +116,10 @@ __slowpow (double x, double y, double z)
|
|
|
|
__mul (&mpy, &mpz, &mpw, p);
|
|
|
|
__mpexp (&mpw, &mpp, p);
|
|
|
|
__mp_dbl (&mpp, &res, p);
|
2012-03-15 03:21:22 +00:00
|
|
|
+
|
|
|
|
+ /* Track how often we get to the uber-slow pow code plus
|
|
|
|
+ its input/output values. */
|
2013-06-04 16:53:45 +00:00
|
|
|
+ LIBC_PROBE (slowpow_p32, 4, &x, &y, &z, &res);
|
2012-03-15 03:21:22 +00:00
|
|
|
+
|
|
|
|
return res;
|
|
|
|
}
|