[PATCH] Fix filename generation for out of memory dumps.

View: New views
3 Messages — Rating Filter:   Alert me  

[PATCH] Fix filename generation for out of memory dumps.

by David Daney-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

As noted here:

http://gcc.gnu.org/ml/java/2009-07/msg00067.html

The filename generation in the out of memory dumps is a bit screwed up.  
This patch restores it to its intended state.

Bootstrapped and regression tested on x86_64-pc-linux-gnu with no
regressions.

OK to commit?

2009-07-28  David Daney  <ddaney@...>

    * gnu/gcj/util/natGCInfo.cc (nomem_handler): Use oomDumpName as
    dump file name base.


Index: gnu/gcj/util/natGCInfo.cc
===================================================================
--- gnu/gcj/util/natGCInfo.cc (revision 150090)
+++ gnu/gcj/util/natGCInfo.cc (working copy)
@@ -407,7 +407,7 @@ nomem_handler(size_t size)
   if (oomDumpName)
     {
       char temp[strlen(oomDumpName) + 20];
-      sprintf(temp, "%s%03d", temp, GC_dump_count++);
+      sprintf(temp, "%s%03d", oomDumpName, GC_dump_count++);
       printf("nomem_handler(%zd) called\n", size);
       gc_ok--;
       GC_enumerator x(temp);

Re: [PATCH] Fix filename generation for out of memory dumps.

by Andrew Haley :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 07/28/2009 06:18 AM, David Daney wrote:

> As noted here:
>
> http://gcc.gnu.org/ml/java/2009-07/msg00067.html
>
> The filename generation in the out of memory dumps is a bit screwed up.
> This patch restores it to its intended state.
>
> Bootstrapped and regression tested on x86_64-pc-linux-gnu with no
> regressions.
>
> OK to commit?
>
> 2009-07-28  David Daney  <ddaney@...>
>
>    * gnu/gcj/util/natGCInfo.cc (nomem_handler): Use oomDumpName as
>    dump file name base.
>

OK.

Andrew.


Re: [PATCH] Fix filename generation for out of memory dumps.

by Andrew Haley :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 07/28/2009 06:18 AM, David Daney wrote:

> As noted here:
>
> http://gcc.gnu.org/ml/java/2009-07/msg00067.html
>
> The filename generation in the out of memory dumps is a bit screwed up.
> This patch restores it to its intended state.
>
> Bootstrapped and regression tested on x86_64-pc-linux-gnu with no
> regressions.
>
> OK to commit?
>
> 2009-07-28  David Daney  <ddaney@...>
>
>    * gnu/gcj/util/natGCInfo.cc (nomem_handler): Use oomDumpName as
>    dump file name base.
>

OK.

Andrew.