error building with jit

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

error building with jit

S11001001
I decided to try out the JIT (./configure --enable-jit
--enable-gtk=no).  I don't have a separate install of lightning, but
figured the included lightning would suffice.

As I am on i686 GNU/Linux, I get the i386 headers for lightning, but
get this error while making:

In file included from ../lightning/lightning.h:49,
                 from xlat.c:35:
../lightning/funcs.h: In function 'jit_flush_code':
../lightning/funcs.h:77: error: expected expression before 'else'
... some cascades ...

Here is the surrounding code with comments stripped:

  if (page >= prev_page && page + length <= prev_page + prev_length)
    return;

  mprotect ((void *) page, length, PROT_READ | PROT_WRITE | PROT_EXEC);

  else if (page >= prev_page && page <= prev_page + prev_length)
    prev_length = page + length - prev_page;

So, where does this mprotect call fit in the scheme of things?

--
Stephen Compall
http://scompall.nocandysw.com/blog


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: error building with jit

Paolo Bonzini
>   if (page >= prev_page && page + length <= prev_page + prev_length)
>     return;
>
>   mprotect ((void *) page, length, PROT_READ | PROT_WRITE | PROT_EXEC);
>
>   else if (page >= prev_page && page <= prev_page + prev_length)
>     prev_length = page + length - prev_page;
>
> So, where does this mprotect call fit in the scheme of things?

There, but without the following else.

Paolo


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Re: error building with jit

Chun, Sungjin
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

does jit work well, at least on linux? I actually cannot try this
because of this problem - I cannot even compile :-) - but from my
memory(was on Mac OS X), when I enable jit, make check failed.

Thanks in advance.

Paolo Bonzini wrote:

>>   if (page >= prev_page && page + length <= prev_page + prev_length)
>>     return;
>>
>>   mprotect ((void *) page, length, PROT_READ | PROT_WRITE | PROT_EXEC);
>>
>>   else if (page >= prev_page && page <= prev_page + prev_length)
>>     prev_length = page + length - prev_page;
>>
>> So, where does this mprotect call fit in the scheme of things?
>
> There, but without the following else.
>
> Paolo
>
>
> _______________________________________________
> help-smalltalk mailing list
> [hidden email]
> http://lists.gnu.org/mailman/listinfo/help-smalltalk

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFNHgnQqspS1+XJHgRAi+NAJ9WSP8tkyIgcnDTovRLortcUjCoJACg3wiP
OW0/B9kMxfTrcnFz3gTf2is=
=xcYy
-----END PGP SIGNATURE-----


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Re: error building with jit

Paolo Bonzini

> does jit work well, at least on linux? I actually cannot try this
> because of this problem - I cannot even compile :-) - but from my
> memory(was on Mac OS X), when I enable jit, make check failed.
>  
It *is* experimental, but it should work and should be 3-4 times faster.

Paolo


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Re: error building with jit

Chun, Sungjin
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Paolo Bonzini wrote:
> It *is* experimental, but it should work and should be 3-4 times faster.

Where can I fetch runnable version? 2.2a crashes during make( crashed
during image creation process).

Thanks in advance.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFNH5mQqspS1+XJHgRAjV5AKCOd3K664GDk/SLfJUSzTGmIx+o9QCfZD4m
V2YGYWpB64ChMvQfxupnUf4=
=NAIT
-----END PGP SIGNATURE-----


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Re: error building with jit

Chun, Sungjin
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sungjin Chun wrote:
> Paolo Bonzini wrote:
>>> It *is* experimental, but it should work and should be 3-4 times faster.
>
> Where can I fetch runnable version? 2.2a crashes during make( crashed
> during image creation process).
>
> Thanks in advance.

It seems that there's some bug, which means vm is not crashed :-)

Error message was:

...

make[2]: Entering directory `/home/chunsj/Documents/smalltalk-2.2a'
SMALLTALK_KERNEL="`cd ./kernel; pwd`" \
        SMALLTALK_IMAGE="`pwd`" \
          ./gst -iQ /dev/null
Namespace did not understand selector #setSuperspace:

(ip 38)Namespace class(AbstractNamespace class)>>#primNew:name:
(ip 6)SystemDictionary(AbstractNamespace)>>#addSubspace:
(ip 4)UndefinedObject>>#executeStatements
(ip 0)<bottom>
SystemDictionary new: 512 "<0x40206818>", #Kernel, SystemDictionary new:
512 "<0x40206818>", #Kernel, Namespace, Namespace

/home/chunsj/Documents/smalltalk-2.2a/kernel/SysDict.st:146: Aborted
(ip 38)Namespace class(AbstractNamespace class)>>#primNew:name:
(ip 6)SystemDictionary(AbstractNamespace)>>#addSubspace:
(ip 4)UndefinedObject>>#executeStatements
(ip 0)<bottom>
make[2]: *** [gst.im] Aborted
make[2]: Leaving directory `/home/chunsj/Documents/smalltalk-2.2a'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/chunsj/Documents/smalltalk-2.2a'
make: *** [all] Error 2

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFNH8nQqspS1+XJHgRAuT3AKCpyUhkopWQ002jbxG5MTqPUBlbRwCdGAV8
fUdzv8ZJCN4cT1f6hg4I0JU=
=LfFe
-----END PGP SIGNATURE-----


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Re: error building with jit

S11001001
In reply to this post by Chun, Sungjin
Sungjin Chun wrote:
> Where can I fetch runnable version? 2.2a crashes during make( crashed
> during image creation process).

Is this the tail of your output?

SMALLTALK_KERNEL="`cd ./kernel; pwd`" \
        SMALLTALK_IMAGE="`pwd`" \
          ./gst -iQ /dev/null
Namespace did not understand selector #setSuperspace:

(ip 38)Namespace class(AbstractNamespace class)>>#primNew:name:
(ip 6)SystemDictionary(AbstractNamespace)>>#addSubspace:
(ip 4)UndefinedObject>>#executeStatements
(ip 0)<bottom>
SystemDictionary new: 512 "<0x40213818>", #Kernel, SystemDictionary
new: 512 "<0x40213818>", #Kernel, Namespace, Namespace

/home/sirian/src/archive/smalltalk-jit/kernel/SysDict.st:146: Aborted
(ip 38)Namespace class(AbstractNamespace class)>>#primNew:name:
(ip 6)SystemDictionary(AbstractNamespace)>>#addSubspace:
(ip 4)UndefinedObject>>#executeStatements
(ip 0)<bottom>
make[2]: *** [gst.im] Aborted
make[2]: Leaving directory `/home/sirian/src/archive/smalltalk-jit'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/sirian/src/archive/smalltalk-jit'
make: *** [all] Error 2

--
Stephen Compall
http://scompall.nocandysw.com/blog


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: {Spam?} Re: Re: error building with jit

Paolo Bonzini
In reply to this post by Chun, Sungjin
>
> SMALLTALK_KERNEL="`cd ./kernel; pwd`" \
>         SMALLTALK_IMAGE="`pwd`" \
>           ./gst -iQ /dev/null
> Namespace did not understand selector #setSuperspace:
No, not a bug.  If it does not show up with the interpreter, it is a JIT
bug.

Usually, I try the JIT before stable releases, but not before
alpha.gnu.org releases.

Paolo


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: {Spam?} Re: Re: error building with jit

Paolo Bonzini
Paolo Bonzini wrote:
>>
>> SMALLTALK_KERNEL="`cd ./kernel; pwd`" \
>>         SMALLTALK_IMAGE="`pwd`" \
>>           ./gst -iQ /dev/null
>> Namespace did not understand selector #setSuperspace:
> No, not a bug.  If it does not show up with the interpreter, it is a
> JIT bug.
I mean, not a *smalltalk* bug, but a JIT bug.

Paolo


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: {Spam?} Re: Re: error building with jit

Chun, Sungjin
In reply to this post by Paolo Bonzini
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Paolo Bonzini wrote:
>
> Usually, I try the JIT before stable releases, but not before
> alpha.gnu.org releases.
>
> Paolo

Oh, then I will wait until you make newer release :-) Thank you.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFNIDLQqspS1+XJHgRAh1MAJ913cotQeEy1/rYyCSNMUX3Yz3SwACeMQ5Y
p0Fet6jc3zHPNMVbl5Ni2PA=
=WvcJ
-----END PGP SIGNATURE-----


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk