All of lore.kernel.org
 help / color / mirror / Atom feed
* Question about oprofile
@ 2007-03-20 18:47 Ilya Lipovsky
  2007-03-20 19:13 ` Andy Fleming
  2007-03-21 15:21 ` STACK & HEAP Charles Krinke
  0 siblings, 2 replies; 4+ messages in thread
From: Ilya Lipovsky @ 2007-03-20 18:47 UTC (permalink / raw)
  To: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 488 bytes --]

Hi,

 

I am trying to understand how oprofile works, and so far I have a question:

When rfi'ing back into user context the PMM is cleared. However, if PMM is
cleared and then a context switch happens (say, to another CPU-local thread)
the counters keep getting incremented. Is that right?

 

If this is the case, then the PMC statistics account not just for the
current user thread, but also for other ones as well and thus are not
"pure."

 

Thanks in advance for your help.

-Ilya


[-- Attachment #2: Type: text/html, Size: 2875 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question about oprofile
  2007-03-20 18:47 Question about oprofile Ilya Lipovsky
@ 2007-03-20 19:13 ` Andy Fleming
  2007-03-20 23:07   ` Ilya Lipovsky
  2007-03-21 15:21 ` STACK & HEAP Charles Krinke
  1 sibling, 1 reply; 4+ messages in thread
From: Andy Fleming @ 2007-03-20 19:13 UTC (permalink / raw)
  To: Ilya Lipovsky; +Cc: linuxppc-embedded


On Mar 20, 2007, at 13:47, Ilya Lipovsky wrote:

> Hi,
>
>
>
> I am trying to understand how oprofile works, and so far I have a =20
> question:
>
> When rfi=92ing back into user context the PMM is cleared. However, if =20=

> PMM is cleared and then a context switch happens (say, to another =20
> CPU-local thread) the counters keep getting incremented. Is that =20
> right?
>
>
>
> If this is the case, then the PMC statistics account not just for =20
> the current user thread, but also for other ones as well and thus =20
> are not =93pure.=94

oprofile does not support counting just on one thread.  The PMM bit =20
is only used to make it so that the interrupt handler and setup code =20
are not counted.  In order to count in one thread, you would need to =20
modify the context switch code to allow the PMM bit to stay set on =20
marked threads, and you would need to modify the oprofile code in =20
arch/powerpc to only count when the mark bit is set (rather than when =20=

it is cleared).

Andy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Question about oprofile
  2007-03-20 19:13 ` Andy Fleming
@ 2007-03-20 23:07   ` Ilya Lipovsky
  0 siblings, 0 replies; 4+ messages in thread
From: Ilya Lipovsky @ 2007-03-20 23:07 UTC (permalink / raw)
  To: 'Andy Fleming'; +Cc: linuxppc-embedded

Has anyone considered doing something like lazy FPU/Altivec save/restore,
but only for PMC registers (depending on the PMM field in the MSR)... or is
it a lame idea :)?

-Ilya

-----Original Message-----
From: Andy Fleming [mailto:afleming@freescale.com] 
Sent: Tuesday, March 20, 2007 3:14 PM
To: Ilya Lipovsky
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: Question about oprofile


On Mar 20, 2007, at 13:47, Ilya Lipovsky wrote:

> Hi,
>
>
>
> I am trying to understand how oprofile works, and so far I have a  
> question:
>
> When rfi'ing back into user context the PMM is cleared. However, if  
> PMM is cleared and then a context switch happens (say, to another  
> CPU-local thread) the counters keep getting incremented. Is that  
> right?
>
>
>
> If this is the case, then the PMC statistics account not just for  
> the current user thread, but also for other ones as well and thus  
> are not "pure."

oprofile does not support counting just on one thread.  The PMM bit  
is only used to make it so that the interrupt handler and setup code  
are not counted.  In order to count in one thread, you would need to  
modify the context switch code to allow the PMM bit to stay set on  
marked threads, and you would need to modify the oprofile code in  
arch/powerpc to only count when the mark bit is set (rather than when  
it is cleared).

Andy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* STACK & HEAP
  2007-03-20 18:47 Question about oprofile Ilya Lipovsky
  2007-03-20 19:13 ` Andy Fleming
@ 2007-03-21 15:21 ` Charles Krinke
  1 sibling, 0 replies; 4+ messages in thread
From: Charles Krinke @ 2007-03-21 15:21 UTC (permalink / raw)
  To: linuxppc-embedded; +Cc: Chris Carlson

[-- Attachment #1: Type: text/plain, Size: 161 bytes --]

Where are the stack and heap initialized in a linux-2.6.17.11 kernel for
user space applications after init runs for a PPC8241 architecture?

 

Charles


[-- Attachment #2: Type: text/html, Size: 1909 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-03-21 15:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-20 18:47 Question about oprofile Ilya Lipovsky
2007-03-20 19:13 ` Andy Fleming
2007-03-20 23:07   ` Ilya Lipovsky
2007-03-21 15:21 ` STACK & HEAP Charles Krinke

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.