[rfc][icedtea-web] refactored logging for plugin

Jiri Vanek jvanek at redhat.com
Thu Oct 24 07:40:11 PDT 2013


On 10/23/2013 07:37 PM, Jiri Vanek wrote:
> On 10/22/2013 07:11 PM, Andrew Azores wrote:
>> On 10/22/2013 12:00 PM, Jiri Vanek wrote:
>>> Hi!
>>>
>>> This is adding possibility to configure plugin debug via itw-settings, is getting rid of
>>> uncontrolled print outs, and add java-like headers (if enabled)
>>> Please, do  not look  on duplicated code in PLUGIN_{error,debug} macros, I will get rid of it when
>>> I will do  enty points for file log and system log.
>>>
>>> I have intentionally ignored way to force plugin debug via -verbose sent via itw-settings jvm
>>> parameters. Imho it will be missus.
>>>
>>> J.
>>
>> Applying this patch makes my Firefox immediately crash when trying to visit any page with a Java
>> applet. On my F19 workstation, there is no terminal output at all when this happens, but Mozilla's
>> automatic bug reporter does open. On my laptop running Arch, there is no bug reporter and nothing
>> especially helpful is printed either, but it does tell me there was a segfault. On my laptop this
>> can happen at any time, not just when visiting a page with an applet. I don't really know why that's
>> happening the way it is, but I've never had this behaviour at all before applying this patch, and
>> after the patch it's very reproducible :(
>>
>> Thanks,
>>
>
> Well yes, I can confirm the issue (now on latest f19).  The initial patch was written on f14, jdk6
> .. legacy gcc... And I swear it was working. (probably not depending on ff as even cpp tests were
> passing on f14, failing on f19)
>
>

Ok, here is much better set of patches:

the refactoredPrintfToPLUGIN_X+tests must be applied first, and is just plain refactoring printf -> 
PLUGIN_{DEBUG,ERROR} . with "profiling" test. And (maybe with small changes) I would like to propose 
it also to 1.4 to make backporting easier.

The second patch - includedUsageOfProeprtiesIntoLoggingMechanism - is adding the connection to 
deployment_properties in time when PLUGIN_* is first called.

Good think is, that (according to excellent profiling ) when debug is none, then it do no measurable 
slowdown. On the other side, when also headers are on, then the  logging was 100times slower. But 
considering that headers can be simply of and are providing many additional information, then  it is 
worthy.

J.

ps, the:
 >>> Please, do  not look  on duplicated code in PLUGIN_{error,debug} macros, I will get rid of it when
 >>> I will do  enty points for file log and system log.
IS still valid :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: refactoredPrintfToPLUGIN_X+tests.patch
Type: text/x-patch
Size: 20812 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20131024/62f8b957/refactoredPrintfToPLUGIN_Xtests-0001.patch 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: includedUsageOfProeprtiesIntoLoggingMechanism.patch
Type: text/x-patch
Size: 10645 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20131024/62f8b957/includedUsageOfProeprtiesIntoLoggingMechanism-0001.patch 


More information about the distro-pkg-dev mailing list