* Patch: stack trace: don't try to exec addr2line again if it failed previously
@ 2006-05-11 22:17 Bryce McKinlay
0 siblings, 0 replies; only message in thread
From: Bryce McKinlay @ 2006-05-11 22:17 UTC (permalink / raw)
To: Java Patches
[-- Attachment #1: Type: text/plain, Size: 219 bytes --]
This is another small optimization for NameFinder: If the system doesn't
have addr2line installed, we don't want to keep trying to exec it every
time a stack trace is printed.
I'm checking this in to trunk.
Bryce
[-- Attachment #2: libjava-namefinder-exec.patch --]
[-- Type: text/x-patch, Size: 1053 bytes --]
2006-05-11 Bryce McKinlay <mckinlay@redhat.com>
* gnu/gcj/runtime/NameFinder.java (lookup): If exec'ing addr2line
fails, don't try again.
(use_addr2line): Field no longer final.
Index: gnu/gcj/runtime/NameFinder.java
===================================================================
--- gnu/gcj/runtime/NameFinder.java (revision 113711)
+++ gnu/gcj/runtime/NameFinder.java (working copy)
@@ -62,7 +62,7 @@
*/
private static Set blacklist = Collections.synchronizedSet(new HashSet());
- private static final boolean use_addr2line
+ private static boolean use_addr2line
= Boolean.valueOf(System.getProperty
("gnu.gcj.runtime.NameFinder.use_addr2line", "true")
).booleanValue();
@@ -166,8 +166,11 @@
procs.put(file, addr2line);
}
- if (addr2line.proc == null)
- return;
+ if (addr2line.proc == null)
+ {
+ use_addr2line = false;
+ return;
+ }
String hexAddr = "0x" + Long.toHexString(addr);
String name;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-05-11 22:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-11 22:17 Patch: stack trace: don't try to exec addr2line again if it failed previously Bryce McKinlay
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).