Re: [PATCH] ia64 oprofile support for 2.6.0-test4

From: David Mosberger <davidm_at_napali.hpl.hp.com>
Date: 2003-08-27 06:58:46
>>>>> On Tue, 26 Aug 2003 16:42:27 -0400, Will Cohen <wcohen@redhat.com> said:

  Will> +	eip = instruction_pointer(regs);

eip?  How about calling it "ip", which is the register name and what's
used everywhere else in the ia64 tree.

  Will> +/*
  Will> + * We use the ia64_psr(regs)->ri to determine which of the three
  Will> + * instructions in bundle took the sample. The instructions in the
  Will> + * ia64 do not fall on nice four byte boundaries, so there is no point
  Will> + * in multiplying ia64_psr(regs)->ri by 4.
  Will> + */
  Will> +#define instruction_pointer(regs) ((regs)->cr_iip + ia64_psr(regs)->ri)

How are you going to get instruction-level precision with this?

Given this:

  Will> -	ip >>= prof_shift;

you'd have to use a prof_shift of 0, which is wasteful.  If you
multiply ri by 4, you can use a prof_shift of 2, reducing the
histogram size by a factor of 4 while still getting instruction-level
accuracy.

I can see why you don't want to do the multiply-by-four in
instruction_pointer(), but if that's what you want to avoid, I think
ia64_do_profile() should should do it so we can get the desired
effect.

	--david
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Tue Aug 26 17:02:49 2003

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:17 EST