Re: [Gems-users] Ruby magic instructions interference: Warning: in fn void magic_instruction_callback


Date: Wed, 16 May 2007 10:43:47 -0500
From: Dan Gibson <degibson@xxxxxxxx>
Subject: Re: [Gems-users] Ruby magic instructions interference: Warning: in fn void magic_instruction_callback
Ruby handles assumes magic instructions are directives passed to Ruby to perform various tasks (eg. begin_transaction, etc.). Its actually a *good* thing that you're seeing warnings -- its because Ruby doesn't know how to interpret the magic number, and therefore isn't doing anything.

You should have a look at commands.C to see what values Ruby associates with various actions. So long as you don't use Ruby's magic numbers, you will not incur any Ruby-strangeness due to magic calls.

Since you're using magic number 0, you can safely ignore these warnings. You can trivially modify commands.C to recognize "0" as a null command and not print the warning at all.

Regards,
Dan

Thomas De Schampheleire wrote:
Hi,

I am using Simics 2.2.19 and Ruby release 1.2.
I have added some magic instructions to the OpenSolaris kernel
(UltraSPARC architecture), which are handled by my own callback
function. This works as I expect.

However, when adding Ruby to the simulation, I get warnings on every
magic instruction:

cpu0 [ cycle 56876262505L ]: [ magic 1021 ] disp_getwork()
Warning: in fn void magic_instruction_callback(void*, void*,
integer_t) in simics/commands.C:158: val is 0
Warning: in fn void magic_instruction_callback(void*, void*,
integer_t) in simics/commands.C:158: val is 0
Warning: in fn void magic_instruction_callback(void*, void*,
integer_t) in simics/commands.C:159: Unexpected magic call
Warning: in fn void magic_instruction_callback(void*, void*,
integer_t) in simics/commands.C:159: Unexpected magic call

The first line is the line that is printed out by my own handler, and
the subsequent four lines seem to come from Ruby code.

Can I avoid having these warnings by using other numbers for my magic
instructions? (which range of magic instructions is used by Ruby?)
Can my magic instructions interfere with Ruby?
Can I possibly turn off these warnings?

Thank you,
Thomas
_______________________________________________
Gems-users mailing list
Gems-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/gems-users
Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/"; to your search.


--
http://www.cs.wisc.edu/~gibson [esc]:wq!

[← Prev in Thread] Current Thread [Next in Thread→]