From 10e1cf6b73f1598e57d24933a0949dbeffa2c8a0 Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Fri, 11 Oct 2013 22:37:53 +0530 Subject: 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. --- sysdeps/ieee754/dbl-64/s_atan.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sysdeps/ieee754/dbl-64/s_atan.c') diff --git a/sysdeps/ieee754/dbl-64/s_atan.c b/sysdeps/ieee754/dbl-64/s_atan.c index 7b6c83ffb6..35ab5c1926 100644 --- a/sysdeps/ieee754/dbl-64/s_atan.c +++ b/sysdeps/ieee754/dbl-64/s_atan.c @@ -42,6 +42,7 @@ #include "uatan.tbl" #include "atnat.h" #include +#include void __mpatan (mp_no *, mp_no *, int); /* see definition in mpatan.c */ static double atanMp (double, const int[]); @@ -306,8 +307,12 @@ atanMp (double x, const int pr[]) __mp_dbl (&mpy1, &y1, p); __mp_dbl (&mpy2, &y2, p); if (y1 == y2) - return y1; + { + LIBC_PROBE (slowatan, 3, &p, &x, &y1); + return y1; + } } + LIBC_PROBE (slowatan_inexact, 3, &p, &x, &y1); return y1; /*if impossible to do exact computing */ } -- cgit 1.4.1