From: <ni...@us...> - 2008-10-12 21:18:16
|
Revision: 366 http://mspsim.svn.sourceforge.net/mspsim/?rev=366&view=rev Author: nifi Date: 2008-10-12 21:18:04 +0000 (Sun, 12 Oct 2008) Log Message: ----------- only call profiler if such is found Modified Paths: -------------- mspsim/se/sics/mspsim/cli/ProfilerCommands.java Modified: mspsim/se/sics/mspsim/cli/ProfilerCommands.java =================================================================== --- mspsim/se/sics/mspsim/cli/ProfilerCommands.java 2008-10-12 21:12:06 UTC (rev 365) +++ mspsim/se/sics/mspsim/cli/ProfilerCommands.java 2008-10-12 21:18:04 UTC (rev 366) @@ -94,7 +94,7 @@ }); - ch.registerCommand("printcalls", new BasicAsyncCommand("print functioncalls", "") { + ch.registerCommand("printcalls", new BasicAsyncCommand("print function calls", "") { @Override public int executeCommand(CommandContext context) { Profiler profiler = cpu.getProfiler(); @@ -108,10 +108,9 @@ @Override public void stopCommand(CommandContext context) { Profiler profiler = cpu.getProfiler(); - if (profiler == null) { - context.err.println("No profiler found."); + if (profiler != null) { + profiler.setLogger(null); } - profiler.setLogger(null); } }); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |