SQUEAK_SPY and -spy option

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

SQUEAK_SPY and -spy option

stes

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


I've already asked this question on vm-dev, with no replies so far.

Perhaps someone knows here on this list ...

I wonder whether anyone is using the SQUEAK_SPY environment variable,
or knows what this is doing.

In the VM source code :

platforms/unix/vm-display-X11/sqUnixX11.c:int withSpy=          0;
platforms/unix/vm-display-X11/sqUnixX11.c:  if (getenv("SQUEAK_SPY"))           withSpy= 1;
platforms/unix/vm/sqUnixMain.c:       int    withSpy=           0;
platforms/unix/vm/sqUnixMain.c:  else if (!strcmp(argv[0], VMOPTION("spy")))       { withSpy = 1; return 1; }

Also I wonder why both .c files (sqUnixX11.c and sqUnixMain.c) both define
the same global variable (they both define withSpy).

Maybe the VM -spy option is somehow related to spyOn: and MessageTally ??

http://wiki.squeak.org/squeak/4210

It's just a guess.
I don't immediately see any documentation on this on wiki.squeak.org.

Perhaps -spy is related to Squeak Performance Tuning ?

Is anyone using -spy or SQUEAK_SPY ?

David Stes






-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJfTKHkAAoJEAwpOKXMq1MaHqoH/Ar6sReeDUhwcWDPWCyWupIc
07gQMUEcM2rUa3hZCysoGQGJGPH7ZXNEj8QViW4QIwrAnR0j6GGz9M648rOot9IF
9yH3TEFmPk4hCYq8UADyfxFRpEBs9dOKk3TVE0LLIo1KTWqyo+Fz4SYQQFWQnfZ2
5lXVwbDJlfFyBOvGaNCAzFgoftWSL1KhxEsGuhPKo1b2WO++T9rNVF4eSvlKltJR
5rr/bmuOC0ILYcDBe0+wsYg5O17DdSMPRSeKBgwqlnMS6xquxfS90VS7J1uH6wC3
Qe+fDeaDJxHZ05+aEL8aSAMhKiGfm5oBOc07gVxYO20otmWt9sTgaGhY1+3QEZo=
=RR59
-----END PGP SIGNATURE-----

Reply | Threaded
Open this post in threaded view
|

Re: SQUEAK_SPY and -spy option

David T. Lewis
It looks like dead code to me. It sets a variable that is no longer
referenced. My guess would be that it sets a flag that Ian used in early
development of the Unix Squeak VM, possibly it was related to the jitter
VMs that he was doing in early days.

You can see the option being set in the sqUnixMain.c module back in 2003:
http://squeakvm.org/cgi-bin/viewvc.cgi/squeak/trunk/platforms/unix/vm/sqUnixMain.c?revision=620&view=markup

Earlier version control for the VM was kept on SourceForge, I don't know
if that is still available for historical purposes.

In any case, as far as I can tell it is just an option setting that once
meant something, but that has not been used for a long time.

Dave


On Mon, Aug 31, 2020 at 09:09:28AM +0200, [hidden email] wrote:

>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
>
> I've already asked this question on vm-dev, with no replies so far.
>
> Perhaps someone knows here on this list ...
>
> I wonder whether anyone is using the SQUEAK_SPY environment variable,
> or knows what this is doing.
>
> In the VM source code :
>
> platforms/unix/vm-display-X11/sqUnixX11.c:int withSpy=          0;
> platforms/unix/vm-display-X11/sqUnixX11.c:  if (getenv("SQUEAK_SPY"))           withSpy= 1;
> platforms/unix/vm/sqUnixMain.c:       int    withSpy=           0;
> platforms/unix/vm/sqUnixMain.c:  else if (!strcmp(argv[0], VMOPTION("spy")))       { withSpy = 1; return 1; }
>
> Also I wonder why both .c files (sqUnixX11.c and sqUnixMain.c) both define
> the same global variable (they both define withSpy).
>
> Maybe the VM -spy option is somehow related to spyOn: and MessageTally ??
>
> http://wiki.squeak.org/squeak/4210
>
> It's just a guess.
> I don't immediately see any documentation on this on wiki.squeak.org.
>
> Perhaps -spy is related to Squeak Performance Tuning ?
>
> Is anyone using -spy or SQUEAK_SPY ?
>
> David Stes
>
>
>
>
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2
>
> iQEcBAEBCAAGBQJfTKHkAAoJEAwpOKXMq1MaHqoH/Ar6sReeDUhwcWDPWCyWupIc
> 07gQMUEcM2rUa3hZCysoGQGJGPH7ZXNEj8QViW4QIwrAnR0j6GGz9M648rOot9IF
> 9yH3TEFmPk4hCYq8UADyfxFRpEBs9dOKk3TVE0LLIo1KTWqyo+Fz4SYQQFWQnfZ2
> 5lXVwbDJlfFyBOvGaNCAzFgoftWSL1KhxEsGuhPKo1b2WO++T9rNVF4eSvlKltJR
> 5rr/bmuOC0ILYcDBe0+wsYg5O17DdSMPRSeKBgwqlnMS6xquxfS90VS7J1uH6wC3
> Qe+fDeaDJxHZ05+aEL8aSAMhKiGfm5oBOc07gVxYO20otmWt9sTgaGhY1+3QEZo=
> =RR59
> -----END PGP SIGNATURE-----
>

Reply | Threaded
Open this post in threaded view
|

Re: SQUEAK_SPY and -spy option

stes
In reply to this post by stes

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


If noone is using this variable (or switch), over time, I may submit a
patch to remove it (not right away, but in the far future :-)).

This is not urgent of course, but when running a tool on the Squeak VM
("link analysis of runtime interfaces") it flags the withSpy variable as
interesting because it is declared and defined in two places.

And if it is not really used (at all) then there's no point in doing that.

David Stes


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJfTnsNAAoJEAwpOKXMq1Mad8gH/0Ux6sr6jIPlNiFz4fi1WW4W
FHNnHzRueXXklILZuuCBQFs0lEVxZIVhVJTQuC7LyLa+rjTofvZxQ8ZueR9N4o23
lAUvGxhqK2/rhMUp97Ccq5iH5tR6Py820r2bI4Gbl0B+rL3AdWBWLvtaUSXSU/0g
1TVtMhhuR4X73MysE3ikfN7fagFk2wUs0BGuO3FlZriQikc86hogGcbDTiLy8P4o
dowUOGwRd1Tx1WZkRPgcDEDoeXV0V4Gpcy3gVvKBITrOOCTZOBr9Oa7HNq3JbnlL
D8co9nYaO+CMu/U3cAJ4NQFOjPGO+z8f9aQfPFn5Bs2wNXXrnjP7O9eohJsmZd4=
=SP1E
-----END PGP SIGNATURE-----