public inbox for frysk-cvs@sourceware.org help / color / mirror / Atom feed
From: swagiaal@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: swagiaal: fixed fcatch bad memory use. Date: Tue, 11 Mar 2008 19:37:00 -0000 [thread overview] Message-ID: <20080311193750.11037.qmail@sourceware.org> (raw) The branch, master has been updated via fbc2e7379f2b9ca0e5aac52425f94521527d26f0 (commit) from 537514afa8afe63a15d3a06d916b6c6bc3160881 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit fbc2e7379f2b9ca0e5aac52425f94521527d26f0 Author: Sami Wagiaalla <swagiaal@redhat.com> Date: Tue Mar 11 15:24:09 2008 -0400 swagiaal: fixed fcatch bad memory use. frysk-core/frysk/util/ChangeLog +2008-03-11 Sami Wagiaalla <swagiaal@redhat.com> + + * FCatch.java: Remove cached stack trace if new stack + trace is available. + ----------------------------------------------------------------------- Summary of changes: frysk-core/frysk/util/ChangeLog | 5 +++++ frysk-core/frysk/util/FCatch.java | 15 ++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) First 500 lines of diff: diff --git a/frysk-core/frysk/util/ChangeLog b/frysk-core/frysk/util/ChangeLog index 811af42..b2d6f27 100644 --- a/frysk-core/frysk/util/ChangeLog +++ b/frysk-core/frysk/util/ChangeLog @@ -1,3 +1,8 @@ +2008-03-11 Sami Wagiaalla <swagiaal@redhat.com> + + * FCatch.java: Remove cached stack trace if new stack + trace is available. + 2008-03-11 Andrew Cagney <cagney@redhat.com> * StressTestStackTraceAction.java: Update to match Offspring. diff --git a/frysk-core/frysk/util/FCatch.java b/frysk-core/frysk/util/FCatch.java index e080b83..7244d1c 100644 --- a/frysk-core/frysk/util/FCatch.java +++ b/frysk-core/frysk/util/FCatch.java @@ -73,7 +73,7 @@ public class FCatch { */ private void printStackTrace(Task task, SignalStack signalStack) { printWriter.println("\n" + task.getProc().getPid() + "." - + task.getTid() + " was terminated with signal " + + task.getTid() + " terminated with signal " + signalStack.signal); printWriter.println(signalStack.stack); printWriter.flush(); @@ -86,9 +86,17 @@ public class FCatch { class CatchObserver implements TaskObserver.Terminated, TaskObserver.Signaled{ public Action updateTerminated(Task task, Signal signal, int value) { - SignalStack signalStack = (SignalStack) signaledTasks.get(task); - if (signalStack != null && signal.equals(signalStack.signal)) { + SignalStack signalStack = (SignalStack) signaledTasks.remove(task); + if (signalStack != null && signal != null && signal.equals(signalStack.signal)) { printStackTrace(task, signalStack); + }else{ + // if the main thread exited print out a message that the process + // terminated safely + if(task.getTid() == task.getProc().getPid()){ + printWriter.println(task.getProc().getPid() + "." + + task.getTid() + " terminated normally"); + printWriter.flush(); + } } return Action.CONTINUE; } @@ -103,6 +111,7 @@ public class FCatch { SignalStack signalStack = new SignalStack(); signalStack.signal = signal; signalStack.stack = stringWriter.getBuffer().toString(); + signaledTasks.remove(task); signaledTasks.put(task, signalStack); return Action.CONTINUE; hooks/post-receive -- frysk system monitor/debugger
reply other threads:[~2008-03-11 19:37 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20080311193750.11037.qmail@sourceware.org \ --to=swagiaal@sourceware.org \ --cc=frysk-cvs@sourceware.org \ --cc=frysk@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).