Not sure... perhaps one of the libraries you're linking with on Alpha
calls _sysctl when for some reason the x86 version of the library
doesn't.  It's odd that none of the programs we've ever run has needed
it... what versions of gcc & linux are you using for the compile?

You can do a 'man 2 sysctl' to see what the syscall is supposed to do
and then try to implement at least whatever functionality your
application needs.  Or you can try the quick & dirty approach, which is
to change the function pointer for _sysctl in alpha_linux_process.cc
from unimplementedFunc to ignoreFunc, which will make it print a warning
and keep going rather than terminate with an error.  No guarantees that
your program won't crash because of this though.

If you do end up implementing _sysctl, please share your code with us.

Steve

Zhang zhibin wrote:
> hi, Steve.
> By the way, i compile my program on x86 machine and use strace to check 
> all my syscalls, here list the report. I find that my program did not 
> call sysctl, so where did sysctl come from ? I am confused, can you help me?
> 
> % time     seconds  usecs/call     calls    errors syscall
> ------ ----------- ----------- --------- --------- ----------------
>  80.13    0.095548           5     17918           time
>  10.68    0.012731         146        87           munmap
>   4.62    0.005509           8       688           read
>   1.67    0.001991        1991         1           shmdt
>   0.57    0.000680           8        87         1 open
>   0.40    0.000474           4       110           mmap2
>   0.37    0.000445           4       105           brk
>   0.34    0.000402          40        10           write
>   0.29    0.000347           4        89           fstat64
>   0.27    0.000317           4        84           close
>   0.23    0.000277           9        32           socket
>   0.22    0.000261           4        64           setsockopt
>   0.18    0.000209         209         1           execve
>   0.02    0.000018          18         1           shmat
>   0.01    0.000015           8         2           gettimeofday
>   0.01    0.000011          11         1           shmget
>   0.01    0.000006           3         2           _llseek
>   0.00    0.000004           4         1           uname
>   0.00    0.000003           3         1           set_thread_area
> ------ ----------- ----------- --------- --------- ----------------
> 100.00    0.119248                 19284         1 total
> -- 
> 
>     *From:* Zhang zhibin <mailto:[EMAIL PROTECTED]>
>     *To:* [email protected]
>     <mailto:[email protected]>
>     *Sent:* Thursday, December 15, 2005 3:33 PM
>     *Subject:* what can I do with unimplemented syscall
> 
>     hi, Steve.
>     I use -static when linking my executable. But when I using
>     ALPHA_SE/m5.debug to execute my program I get:
> 
>     warn: Entering event queue.  Starting simulation...
>     Error: syscall _sysctl (#319) unimplemented.  Args: 4831406368, 0, ...
>     Program aborted at cycle 21847
>     Aborted
>     I do'nt know if the "-static" option in linking is enough.
>     I think maybe _sysctl syscall is not implemented in current
>     version. But is there any other method to get throug it ?  


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
m5sim-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/m5sim-users

Reply via email to