[Cbe-oss-dev] [RFC, PATCH] [POWERPC] spufs: fix order of sputrace thread IDs

Christoph Hellwig hch at lst.de
Tue Feb 26 06:16:13 EST 2008


On Mon, Feb 25, 2008 at 03:02:22PM +1100, Jeremy Kerr wrote:
> Currently, we get the following output from sputrace:
> 
> [5.097935954] 1606: spufs_ps_nopfn__enter (thread = 1605, spu = -1)
> [5.097958164] 1606: spufs_ps_nopfn__insert (thread = 1605, spu = 15)
> [5.097973529] 1607: spufs_ps_nopfn__enter (thread = 1605, spu = -1)
> [5.097989174] 1607: spufs_ps_nopfn__insert (thread = 1605, spu = 14)
> 
> Which leads me to believe that 160[67] is the current thread ID, and
> 1605 is the context backing the psmap.
> 
> However, the 'current' and 'owner' tids are reversed - the 'current'
> tid is on the right. This change puts the current thread ID in the
> left-hand column instead.

Personally I prefer the current one because it tells which context
were talking about at first column.  But I don't really care strongly,
so if you do go ahead.

> 
> Signed-off-by: Jeremy Kerr <jk at ozlabs.org>
> 
> ---
> Christoph - is this the correct ordering?
> 
> ---
>  arch/powerpc/platforms/cell/spufs/sputrace.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/cell/spufs/sputrace.c b/arch/powerpc/platforms/cell/spufs/sputrace.c
> index 01974f7..c9f0bec 100644
> --- a/arch/powerpc/platforms/cell/spufs/sputrace.c
> +++ b/arch/powerpc/platforms/cell/spufs/sputrace.c
> @@ -61,9 +61,9 @@ static int sputrace_sprint(char *tbuf, int n)
>  		"[%lu.%09lu] %d: %s (thread = %d, spu = %d)\n",
>  		(unsigned long) tv.tv_sec,
>  		(unsigned long) tv.tv_nsec,
> -		t->owner_tid,
> -		t->name,
>  		t->curr_tid,
> +		t->name,
> +		t->owner_tid,
>  		t->number);
>  }
>  
---end quoted text---



More information about the cbe-oss-dev mailing list