This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Re: gprof and mips
- From: Jonathan Larmour <jifl at eCosCentric dot com>
- To: "Suzuki, RyosIII" <ryos at sinby dot com>
- Cc: ecos-devel at sources dot redhat dot com,eCos Patches List <ecos-patches at sources dot redhat dot com>
- Date: Sun, 27 Apr 2003 23:03:24 +0100
- Subject: Re: gprof and mips
- References: <5.1.1.9.2.20030423150151.0390a0a0@backyard.sinby.com>
Suzuki, RyosIII wrote:
> Hello,
>
> I'm porting gprof to a mips system.
> I found a bug and have a request.
>
> [BUG]
> the area, profile, is not initialized first.
> so I changed as following,
>
> @@ -231,6 +231,7 @@
> diag_printf("Can't allocate profile buffer - ignored\n");
> return;
> }
> + memset(profile, 0, (num_buckets*2));
> enabled = 1;
> diag_printf("Profile from %p..%p[%p], in %d buckets of size %d\n",
> start_addr, end_addr, _end, num_buckets, bucket_size);
Good point. I've checked this in to CVS.
> [REQUEST]
> I changed mips's vectors.S to use SavedRegister as 3rd argument
> in ISR function. I refered powerPC's vectors.S.
>
> lw a1,0(a1) # Data pointer
>
> move a0,s2 # pass interrupt number
> + move a2,s0 # s0 is SavedRegister.
> by ryos
>
> jalr t2 # call ISR via t2
> nop # (delay slot)
PowerPC is indeed a precedent and it's harmless enough, so I've done this too.
Jifl
--
eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot experts
--[ "You can complain because roses have thorns, or you ]--
--[ can rejoice because thorns have roses." -Lincoln ]-- Opinions==mine