[Gambas-user] Serial Port Change Events Not Working after Upgrade to Karmic

Ron ron at ...1740...
Sat Dec 5 17:39:27 CET 2009


Benoît Minisini schreef:
>> Benoît Minisini schreef:
>>     
>>> It should be ok with revision #2456!
>>>
>>> If it really works, can you check that changing the flow control between
>>> None and something else actually has an effect on CPU consumption?
>>>       
>> Benoît,
>>
>> no segfaults, but the system load when running my project with the patch
>> is alot higher than before.
>>
>> Before it was 0.2-0.3
>> Now it's 1.0-1.10
>>
>> I'm not using flowcontrol.
>>
>> $ grep FlowControl *
>> CCTX35.class:    .FlowControl = 0
>> CGPS.class:    .FlowControl = 0
>> CPlugwise.class:    .FlowControl = 0
>> CRFXComRX.class:    .FlowControl = 0
>> CRFXComTX.class:    .FlowControl = 0
>> CSMS.class:    .FlowControl = 0
>> CVISCA.class:    .FlowControl = 0
>> CWeeder.class:    .FlowControl = 0
>> CZWave.class:    .FlowControl = 0
>>
>> Six of these serialports are active.
>> And I presume 0 is the same as None.
>>
>> Regards,
>> Ron_2nd.
>>
>>     
>
> That would mean that the Read callback is called endlessly, as if there are 
> always bytes to read on the serial port.
>
> Do you use the read event? Can you check that by implementing a Read event 
> handler, check how much time it is called, and check what can be read on the 
> serial port?
>
> If there is something to read on the serial port, if there are data to read, 
> and if you don't read it, the Read callback will be called again and again.
>
> Regards,
>
>
>   
Benoit,

runned valgrind tool for a while.

And I got a rather strange winner, I got 3 milion calls of _add_char in 
gb_error.c

Some debug code hanging around or something like that?

See attached valgrind file.

Regards,
Ron_2nd.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: callgrind.out.4711.zip
Type: application/x-zip-compressed
Size: 121762 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20091205/be6a0d60/attachment.bin>


More information about the User mailing list