MessageTally broken in Cog

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

MessageTally broken in Cog

Rob Withers
 
Eliot,

I noticed that MessageTally was broken in Cog (which may or may not have
anything to do with Coc).  It broke in MessageTally>>#spyEvery:on: inside
the following code:

        "Collect gc statistics"
        SmalltalkImage current getVMParameters keysAndValuesDo: [ :idx :gcVal |
                gcStats at: idx put: (gcVal - (gcStats at: idx))].

gcVal was nil for index 4.  I looked at all the VMParameters and there are
several nil values.  Is this a Cog thing?  Should all VMParameters be
non-nil?  Should MessageTally change to protect against nil values?

Thanks,
Rob

----
The Modern Whig Party of Virginia - http://vawhigs.org

 

Reply | Threaded
Open this post in threaded view
|

Re: MessageTally broken in Cog

Eliot Miranda-2
 
Hi Rob,

On Sun, Jul 4, 2010 at 10:12 AM, Rob Withers <[hidden email]> wrote:

Eliot,

I noticed that MessageTally was broken in Cog (which may or may not have anything to do with Coc).  It broke in MessageTally>>#spyEvery:on: inside the following code:

       "Collect gc statistics"
       SmalltalkImage current getVMParameters keysAndValuesDo: [ :idx :gcVal |
               gcStats at: idx put: (gcVal - (gcStats at: idx))].

gcVal was nil for index 4.  I looked at all the VMParameters and there are several nil values.  Is this a Cog thing?  

Yes.  There are several vm parameters which are obsolete in Cog.  Answering nil is IMO better than answering some fake value such as 0. Better to provoke an error when fed with bad data than to hide the bug.

Should all VMParameters be non-nil?  

IMO, no.
 
Should MessageTally change to protect against nil values?

See [squeak-dev] The Trunk: System-ul.346.mcz
 

Thanks,
Rob

----
The Modern Whig Party of Virginia - http://vawhigs.org




Reply | Threaded
Open this post in threaded view
|

Re: MessageTally broken in Cog

Rob Withers
 
Thanks, Eliot.  Loaded and working.  99.7% of my code I was profiling was creating a big prime number for use in branding.  My startup is 4 secs per CapTPManager and I use 2 to 3 of them in each test case.  I was wanting to speed up my test cases.
 
Thanks!  Smile emoticon
 
Rob
 
 

Sent: Sunday, July 04, 2010 2:00 PM
Subject: Re: [Vm-dev] MessageTally broken in Cog


Hi Rob,

On Sun, Jul 4, 2010 at 10:12 AM, Rob Withers <[hidden email]> wrote:

Eliot,

I noticed that MessageTally was broken in Cog (which may or may not have anything to do with Coc).  It broke in MessageTally>>#spyEvery:on: inside the following code:

       "Collect gc statistics"
       SmalltalkImage current getVMParameters keysAndValuesDo: [ :idx :gcVal |
               gcStats at: idx put: (gcVal - (gcStats at: idx))].

gcVal was nil for index 4.  I looked at all the VMParameters and there are several nil values.  Is this a Cog thing?  

Yes.  There are several vm parameters which are obsolete in Cog.  Answering nil is IMO better than answering some fake value such as 0. Better to provoke an error when fed with bad data than to hide the bug.

Should all VMParameters be non-nil?  

IMO, no.
 
Should MessageTally change to protect against nil values?

See [squeak-dev] The Trunk: System-ul.346.mcz
 

Thanks,
Rob

----
The Modern Whig Party of Virginia - http://vawhigs.org