changeset 18790:6cd4d0af8547 stable

Fix blank line appearing in profiler output (bug #39524). * profiler.cc (profile_data_accumulator::enter::enter): Don't enter functions which don't have a name, such as the readline event hook function.
author Rik <rik@octave.org>
date Tue, 13 May 2014 21:56:39 -0700
parents 4ca40b289b2c
children 83c85d95ac7b
files libinterp/corefcn/profiler.cc
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/profiler.cc	Wed May 14 23:58:23 2014 +0200
+++ b/libinterp/corefcn/profiler.cc	Tue May 13 21:56:39 2014 -0700
@@ -36,7 +36,11 @@
                                         const std::string& f)
   : acc (a)
 {
-  if (acc.is_active ())
+  // FIXME: Add test for f != "" to prevent a blank line showing up
+  //        in profiler statistics.  See bug #39524.  The root cause
+  //        is that the function name is not set for the recurring readline
+  //        hook function.
+  if (acc.is_active () && f != "")
     {
       fcn = f;
       acc.enter_function (fcn);