reduce memory for javadoc
Jonathan Gibbons
jonathan.gibbons at oracle.com
Mon Apr 15 16:09:59 UTC 2013
Andrew,
Your concerns are noted.
My message was simply to inform the build group that I have fixed
significant memory leaks in javadoc that I believe may have been the
cause of two changesets in the past to increase the memory for javadoc
first from 512m to 768m, and then from 768m to 1024m.
The numbers in my message were simply to validate that on the platform I
was using, I could reduce the memory beyond a point at which I could not
do without my patches applied.
I leave it to the build group to decide whether and how to reduce the
amount of memory provided to javadoc during the build.
-- Jon
On 04/15/2013 07:28 AM, Andrew Hughes wrote:
>
> ----- Original Message -----
>> Andrew,
>>
>> I agree that any change would have to be tested on a variety of
>> platforms. Historically, the limit used to be 512m, but has crept up
>> over recent times. My investigations have been to understand
>> why we have been forced to increase this number; as a result
>> we found out that a memory leak was causing javadoc to retain
>> references to the source code buffers for all the files it was reading.
>>
>> Since javadoc is all Java code, it is reasonable to believe the problem,
>> and the fix, would apply to all platforms, which is why I posted the
>> update here.
> Javadoc may be, but this is how much memory the VM should allocate and how it
> works varies between platforms. I know PowerPC, for example, has usually needed
> a bigger maximum.
>
>> However, additional investigations show that the performance does suffer
>> if we reduce the Xmx value. So the good news is that we can now reduce
>> the value; the question is, do we want to?
>>
>> FWIW, I'm still trying to understand why we need even 512m. But that will
>> be another story.
>>
>> -- Jon
>>
>> On 04/11/2013 03:26 AM, Andrew Hughes wrote:
>>> ----- Original Message -----
>>>> Build folk,
>>>>
>>>> As a result of these two changesets now in tl/langtools, we can now
>>>> reduce the memory requirements for javadoc in
>>>> (root)common/makefiles/javadoc/Javadoc.gmk.
>>>>
>>>> changeset: 1678:3f3cc8d3f13c
>>>> tag: tip
>>>> user: jjg
>>>> date: Mon Apr 08 11:57:37 2013 -0700
>>>> summary: 8011677: EndPosTables should avoid hidden references to
>>>> Parser
>>>>
>>>> changeset: 1677:b402b93cbe38
>>>> user: jjg
>>>> date: Mon Apr 08 11:54:26 2013 -0700
>>>> summary: 8011676: Instances of Tokens.Comment should not be defined
>>>> in inner classes
>>>>
>>>>
>>>> I have done builds with the memory limited to 512m, down from 1024m. I
>>>> did try further, with 384m, but that was too much of a reduction.
>>>>
>>>> $ hg diff
>>>> diff -r 11c057460b91 common/makefiles/javadoc/Javadoc.gmk
>>>> --- a/common/makefiles/javadoc/Javadoc.gmk Fri Apr 05 14:49:54 2013
>>>> -0700
>>>> +++ b/common/makefiles/javadoc/Javadoc.gmk Tue Apr 09 18:42:37 2013
>>>> -0700
>>>> @@ -47,7 +47,7 @@
>>>> BUILD_NUMBER=$(JDK_BUILD_NUMBER)
>>>>
>>>> JAVADOC_CMD = $(JAVA) \
>>>> - -Xmx1024m \
>>>> + -Xmx512m \
>>>> -Djava.awt.headless=true \
>>>> $(NEW_JAVADOC) \
>>>> -bootclasspath $(JDK_OUTPUTDIR)/classes
>>>>
>>>> -- Jon
>>>>
>>> I'd be wary of changing this because, in my experience, it varies depending
>>> on VM and architecture. What was tested for these figures?
>>
More information about the build-dev
mailing list