gprof cleanups

Ian Lance Taylor ian@wasabisystems.com
Wed May 26 05:00:00 GMT 2004


Ben Elliston <bje@au1.ibm.com> writes:

> The following patch makes a start at cleaning up the gprof sources.
> Okay to commit?

This is OK.

> @@ -520,71 +521,36 @@
>     * functions off the flat profile:
>     */
>    if (line_granularity)
> -    {
> -      for (sp = &default_excluded_list[0]; *sp; sp++)
> -	{
> -	  sym_id_add (*sp, EXCL_FLAT);
> -	}
> -    }
> +    for (sp = &default_excluded_list[0]; *sp; sp++)
> +      sym_id_add (*sp, EXCL_FLAT);

I don't understand the point of this loop either before or after your
patch.  Doesn't it just duplicate work down by the loop just a few
lines up?

  for (sp = &default_excluded_list[0]; *sp; sp++)
    {
      sym_id_add (*sp, EXCL_TIME);
      sym_id_add (*sp, EXCL_GRAPH);
      sym_id_add (*sp, EXCL_FLAT);
    }

Ian



More information about the Binutils mailing list