This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add probe markers for sin, cos, asin and acos


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]