Steve and Geoff,
  Thanks both of you for the quick response.  I took your advice and added 
support for stat64.  In syscall_emul.hh at line 606 I added the following : 

///  ADDED 9/6/2007

/// Target stat64() handler.
template <class OS>
SyscallReturn
stat64Func(SyscallDesc *desc, int callnum, LiveProcess *process,
     ThreadContext *tc)
{
    std::string path;

    if (!tc->getMemPort()->tryReadString(path, tc->getSyscallArg(0)))
    return -EFAULT;

    // Adjust path for current working directory
    path = process->fullPath(path);

    struct stat64 hostBuf;
    int result = stat64(path.c_str(), &hostBuf);

    if (result < 0)
    return -errno;

    copyOutStat64Buf<OS>(tc->getMemPort(), tc->getSyscallArg(1), &hostBuf);

    return 0;
}

///  END ADDED 9/6/2007

And added a pointer to that in the /arch/alpha/linx/process.cc file.  It built 
and ran the bechmarks giving me that error (until a core dump), but at least 
that problem has been fixed so thanks a lot for that!  Although, since the 
benchmarks didn't actually complete, I can't say for sure that it actually 
worked (lol).

  In regards to the core dumps, here is the output of trying to run the SPEC06 
PerlBench :

[EMAIL PROTECTED]:~/Development/M5/m5-2.0b3/build/ALPHA_SE$ ./m5.debug 
../../configs/example/se.py -c 
benchmarks/400.perlbench/exe/perlbench_base.amd64-m64-gcc41-nn -i 
benchmarks/400.perlbench/data/ref/input/checkspam.pl -o 
"-Ibenchmarks/400.perlbench/run/run_base_ref_amd64-m64-gcc41-nn.0000/lib/ 
benchmarks/400.perlbench/data/ref/input/checkspam.pl 2500 5 25 11 150 1 1 1 1"
M5 Simulator System

Copyright (c) 2001-2006
The Regents of The University of Michigan
All Rights Reserved


M5 compiled Sep  7 2007 13:15:11
M5 started Fri Sep  7 13:20:02 2007
M5 executing on portonaught
command line: ./m5.debug ../../configs/example/se.py -c 
benchmarks/400.perlbench/exe/perlbench_base.amd64-m64-gcc41-nn -i 
benchmarks/400.perlbench/data/ref/input/checkspam.pl -o 
-Ibenchmarks/400.perlbench/run/run_base_ref_amd64-m64-gcc41-nn.0000/lib/ 
benchmarks/400.perlbench/data/ref/input/checkspam.pl 2500 5 25 11 150 1 1 1 1
Global frequency set at 1000000000000 ticks per second
warn: More than two loadable segments in ELF object.
warn: Ignoring segment @ 0x12021e000 length 0x20.
warn: More than two loadable segments in ELF object.
warn: Ignoring segment @ 0x0 length 0x0.
warn: Entering event queue @ 0.  Starting simulation...
warn: Increasing stack size by one page.
warn: Increasing stack size by one page.
warn: Increasing stack size by one page.
panic: Page table fault when accessing virtual address 0
 @ cycle 5278465500
[invoke:build/ALPHA_SE/sim/faults.cc, line 65]
Program aborted at cycle 5278465500
Aborted (core dumped)


  Sorry about the poor formating.  Thanks again for all the help.

Elliott

Steve Reinhardt <[EMAIL PROTECTED]> wrote: Hi Elliott,

I haven't heard of anyone working on this (please speak up if you have), but 
it's a great idea and we'd be glad to give you a hand it getting it to work.

As Geoff pointed out, one straightforward way to do it would be to run under FS 
mode; then you won't have the problem of emulating additional syscalls.  
However if you want to run under SE mode it shouldn't be that hard to get 
things up either. 

The stat64 call should be pretty straightforward to fix... we implement 
stat/lstat/fstat and lstat64/fstat64 so triangulating among those to figure out 
stat64 shouldn't be too hard.  I'm sure the only reason stat64 isn't there is 
that no one has needed it yet.  Basically you'll need to add a stat64Func in 
src/sim/syscall_emul.hh that looks like statFunc but calls stat64() instead 
(basically apply the same diffs as between fstatFunc and fstat64Func), then add 
a pointer to that function to the Alpha Linux syscall table in 
src/arch/alpha/linux/process.cc. 

The other core dumps and page table faults should be fixable too (if they're 
not things we've already fixed since the last release... got to get that public 
repo access going!, but we'd need more details on what those are to say more. 

Steve

On 9/7/07, Elliott Cooper-Balis <[EMAIL PROTECTED]> wrote: M5 Users,
  Greetings.  I am a new to both M5 and the list so please forgive me if I say 
anything stupid.  I am currently trying to get the SPEC CPU2006 benchmarks to 
run on M5.  I searched the list archive and found absolutely no mention of 
anyone trying to do this, so if this is futile/not supported, please feel free 
to ignore the rest of this email.   

  Under Ubuntu 7.04 (64-bit), I managed to build crosstool's ( 
http://www.kegel.com/crosstool/  ) Alpha gcc/g++/gfortran compilers and 
subsequently build Alpha binaries for all the SPEC06 benchmarks.  
Unfortunately, the only benchmark I could get to run correctly was bzip2.  All 
the rest either produced a page table fault/core dump or gave me an error due 
to an unimplemented syscall (stat64).   

  Is there a trick to getting these benchmarks to work correctly?  Is this even 
possible at this point?  Any help would be greatly appreciated.  Thanks  in 
advance.

Elliott
        

---------------------------------
Yahoo! oneSearch: Finally,   mobile search  that gives answers, not web links.  
 

_______________________________________________
m5-users mailing list
m5-users@m5sim.org
 http://m5sim.org/cgi-bin/mailman/listinfo/m5-users


 _______________________________________________
m5-users mailing list
m5-users@m5sim.org
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users

       
---------------------------------
Yahoo! oneSearch: Finally,  mobile search that gives answers, not web links. 
_______________________________________________
m5-users mailing list
m5-users@m5sim.org
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users

Reply via email to