Re: [m5-dev] A small bug on thread pid and start time.

2011-03-04 Thread Yi Xiang
sorry for the ambiguity. Here is some detail:

At first, I followed this instruction
https://docs.google.com/View?id=dfkk59gg_1079rhf4bd5 AND ran splash2
benchmark on m5.opt (Alpha architecture) with --trace-flags=thread option
enabled to get trace of threads:
//
///
./build/ALPHA_FS/m5.opt --trace-flags=Ruby
*--trace-flags=Thread*--trace-file=memory.trace configs/example/fs.py
-n 8 -b fft
/

To get trace with threads information, I removed the false condition from
/src/arch/alpha/linux like what suggested before in M5 maling-list. However,
the output thread pids and start_times were obvious incorrect, while thread
name was correct. Like follows:
/
2288515504500: threadinfo: Currently Executing Thread FFT,* pid
3211264*, *started
at: -4398043299840*
2288517642500: threadinfo: Currently Executing Thread swapper, *pid 3211264*,
*started at: -4398043299840*
2288589029000: threadinfo: Currently Executing Thread swapper, pid 3211264,
started at: -4398043299840
228859277: threadinfo: Currently Executing Thread FFT, pid 3211264,
started at: -4398043299840
2288772642500: threadinfo: Currently Executing Thread script, pid 3211264,
started at: -4398043299840
2288818042500: threadinfo: Currently Executing Thread script, pid 3211264,
started at: -4398043299840
/

To fix this issue, I made two slightly changes to
/src/arch/alpha/linux/threadinfo.hh:
/
line 106 and line 119:Addr offset;   -int32_t offset;
/

Then I got a much more reasonable trace:
/
2288589029000: threadinfo: Currently Executing Thread swapper, pid 0,
started at: 0
228859277: threadinfo: Currently Executing Thread FFT, pid 813, started
at: 2
2288772642500: threadinfo: Currently Executing Thread script, pid 808,
started at: 2
2288818042500: threadinfo: Currently Executing Thread script, pid 821,
started at: 2
2288840942000: threadinfo: Currently Executing Thread swapper, pid 0,
started at: 0
223227000: threadinfo: Currently Executing Thread migration/4, pid 15,
started at: 0
/

I guess /src/arch/mips/linux/threadinfo.hh also needs to be modified in this
way.

Thanks.

Yi Xiang
___
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev


Re: [m5-dev] A small bug on thread pid and start time.

2011-03-04 Thread Gabe Black
Ok, I looked into this, and I'm pretty sure you're right. The code in
question is reading an int from a structure set up and installed into
the Linux kernel by this special M5 patch:

http://repo.m5sim.org/linux-patches/file/0ab58d9bd9a5/m5/m5struct.diff

The size of that int, according to gdb, is 4 bytes. That corresponds to
the size of an int32_t but not of an Addr which is 8 bytes. This problem
exists in curTaskPID and also curTaskStart.

I'll fix the problem and submit a patch to our patch review system
reviewboard. I'm not sure exactly how it'll show up on the web
interface, but when I commit the change I'll put your name on it if
you'd like. Is it alright to use Yi Xiang y...@colostate.edu?

Gabe

On 03/04/11 00:41, Yi Xiang wrote:
 sorry for the ambiguity. Here is some detail:

 At first, I followed this instruction
 https://docs.google.com/View?id=dfkk59gg_1079rhf4bd5 AND ran splash2
 benchmark on m5.opt (Alpha architecture) with --trace-flags=thread option
 enabled to get trace of threads:
 //
 ///
 ./build/ALPHA_FS/m5.opt --trace-flags=Ruby
 *--trace-flags=Thread*--trace-file=memory.trace configs/example/fs.py
 -n 8 -b fft
 /

 To get trace with threads information, I removed the false condition from
 /src/arch/alpha/linux like what suggested before in M5 maling-list. However,
 the output thread pids and start_times were obvious incorrect, while thread
 name was correct. Like follows:
 /
 2288515504500: threadinfo: Currently Executing Thread FFT,* pid
 3211264*, *started
 at: -4398043299840*
 2288517642500: threadinfo: Currently Executing Thread swapper, *pid 3211264*,
 *started at: -4398043299840*
 2288589029000: threadinfo: Currently Executing Thread swapper, pid 3211264,
 started at: -4398043299840
 228859277: threadinfo: Currently Executing Thread FFT, pid 3211264,
 started at: -4398043299840
 2288772642500: threadinfo: Currently Executing Thread script, pid 3211264,
 started at: -4398043299840
 2288818042500: threadinfo: Currently Executing Thread script, pid 3211264,
 started at: -4398043299840
 /

 To fix this issue, I made two slightly changes to
 /src/arch/alpha/linux/threadinfo.hh:
 /
 line 106 and line 119:Addr offset;   -int32_t offset;
 /

 Then I got a much more reasonable trace:
 /
 2288589029000: threadinfo: Currently Executing Thread swapper, pid 0,
 started at: 0
 228859277: threadinfo: Currently Executing Thread FFT, pid 813, started
 at: 2
 2288772642500: threadinfo: Currently Executing Thread script, pid 808,
 started at: 2
 2288818042500: threadinfo: Currently Executing Thread script, pid 821,
 started at: 2
 2288840942000: threadinfo: Currently Executing Thread swapper, pid 0,
 started at: 0
 223227000: threadinfo: Currently Executing Thread migration/4, pid 15,
 started at: 0
 /

 I guess /src/arch/mips/linux/threadinfo.hh also needs to be modified in this
 way.

 Thanks.

 Yi Xiang
 ___
 m5-dev mailing list
 m5-dev@m5sim.org
 http://m5sim.org/mailman/listinfo/m5-dev

___
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev


Re: [m5-dev] A small bug on thread pid and start time.

2011-03-04 Thread Yi Xiang
Yes. That's OK.
Thanks!

Yi

On  Fri, 04 Mar 2011 01:25:39, Gabe Black wrote:


 Ok, I looked into this, and I'm pretty sure you're right. The code in
 question is reading an int from a structure set up and installed into
 the Linux kernel by this special M5 patch:

 http://repo.m5sim.org/linux-patches/file/0ab58d9bd9a5/m5/m5struct.diff

 The size of that int, according to gdb, is 4 bytes. That corresponds to
 the size of an int32_t but not of an Addr which is 8 bytes. This problem
 exists in curTaskPID and also curTaskStart.

 I'll fix the problem and submit a patch to our patch review system
 reviewboard. I'm not sure exactly how it'll show up on the web
 interface, but when I commit the change I'll put your name on it if
 you'd like. Is it alright to use Yi Xiang y...@colostate.edu?

 Gabe

___
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev


[m5-dev] A small bug on thread pid and start time.

2011-03-03 Thread Yi Xiang
I found a bug while trying to generate trace file for thread execution. At
first, --trace-thread returned wrong value for thread tid and start time.
For example, tids for all the threads are 3211264.

Actually, this bug can be fixed by changing from Addr offset to ini32_t
offset in line106 and line 119 of threadinfo.hh.

After this change, I got the right thread pid.

All the best.

Yi Xiang
___
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev


Re: [m5-dev] A small bug on thread pid and start time.

2011-03-03 Thread Korey Sewell
Many more details are needed for us to incorporate this bug fix.

What is the command line you ran that caused the error?

What is the output that shows the error?

What files do you change to fix the error?

On Thu, Mar 3, 2011 at 9:05 PM, Yi Xiang y...@colostate.edu wrote:

 I found a bug while trying to generate trace file for thread execution. At
 first, --trace-thread returned wrong value for thread tid and start time.
 For example, tids for all the threads are 3211264.

 Actually, this bug can be fixed by changing from Addr offset to ini32_t
 offset in line106 and line 119 of threadinfo.hh.

 After this change, I got the right thread pid.

 All the best.

 Yi Xiang
 ___
 m5-dev mailing list
 m5-dev@m5sim.org
 http://m5sim.org/mailman/listinfo/m5-dev




-- 
- Korey
___
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev


Re: [m5-dev] A small bug on thread pid and start time.

2011-03-03 Thread Gabriel Michael Black

They did mention the line that needed to be changed, so that's covered.

But I think we'll still need that other information (how to reproduce  
it, basically) so we can verify the fix ourselves. In any case, thanks  
for letting us know!


Gabe

Quoting Korey Sewell ksew...@umich.edu:


Many more details are needed for us to incorporate this bug fix.

What is the command line you ran that caused the error?

What is the output that shows the error?

What files do you change to fix the error?

On Thu, Mar 3, 2011 at 9:05 PM, Yi Xiang y...@colostate.edu wrote:


I found a bug while trying to generate trace file for thread execution. At
first, --trace-thread returned wrong value for thread tid and start time.
For example, tids for all the threads are 3211264.

Actually, this bug can be fixed by changing from Addr offset to ini32_t
offset in line106 and line 119 of threadinfo.hh.

After this change, I got the right thread pid.

All the best.

Yi Xiang
___
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev





--
- Korey
___
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev




___
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev


Re: [m5-dev] A small bug on thread pid and start time.

2011-03-03 Thread Korey Sewell
 They did mention the line that needed to be changed, so that's covered.

Oops, Sorry for missing that.

As Gabe says , it's definitely great that you (Yi Xiang) found a bug but we
need a little bit more help to reproduce it and apply the appropriate
changes.

-- 
- Korey
___
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev