This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Add probe markers for sin, cos, asin and acos
- From: Allan McRae <allan at archlinux dot org>
- To: Siddhesh Poyarekar <siddhesh at redhat dot com>, libc-alpha at sourceware dot org
- Date: Fri, 25 Oct 2013 22:46:05 +1000
- Subject: Re: [PATCH] Add probe markers for sin, cos, asin and acos
- Authentication-results: sourceware.org; auth=none
- References: <20131025123854 dot GM23099 at spoyarek dot pnq dot redhat dot com>
On 25/10/13 22:38, Siddhesh Poyarekar wrote:
> Hi,
>
> This patch adds systemtap probe markers for slow multiple precision
> paths in sin, cos, asin and acos. Tested on x86_64. OK to commit?
>
> Siddhesh
>
> * manual/probes.texi (Mathematical Function Probes): Add
> documentation for sin, cos, asin and acos probes.
> * sysdeps/ieee754/dbl-64/sincos32.c: Include stap-probe.h.
> (__sin32): Add slowasin probe.
> (__cos32): Add slowacos probe.
> (__mpsin): Add slowsin probe.
> (__mpcos): Add slowcos probe.
<snip>
>
> #ifndef SECTION
> # define SECTION
> @@ -147,10 +148,10 @@ __sin32 (double x, double res, double res1)
> __dbl_mp (x, &c, p); /* c = x */
> __sub (&b, &c, &a, p);
> /* if a > 0 return min (res, res1), otherwise return max (res, res1). */
> - if (a.d[0] > 0)
> - return (res < res1) ? res : res1;
> - else
> - return (res > res1) ? res : res1;
> + if ((a.d[0] > 0 && res > res1) || (a.d[0] <= 0 && res < res1))
> + res = res1;
> + LIBC_PROBE (slowasin, 2, &res, &x);
> + return res;
> }
You are doing more than add the probe here. I would have thought that
clean-up would need to be a separate patch, or at least have a ChangeLog
entry.
Allan