comparison libinterp/corefcn/profiler.cc @ 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 8c33abdd2f9a
children b45d975aa38f
comparison
equal deleted inserted replaced
18788:4ca40b289b2c 18790:6cd4d0af8547
34 34
35 profile_data_accumulator::enter::enter (profile_data_accumulator& a, 35 profile_data_accumulator::enter::enter (profile_data_accumulator& a,
36 const std::string& f) 36 const std::string& f)
37 : acc (a) 37 : acc (a)
38 { 38 {
39 if (acc.is_active ()) 39 // FIXME: Add test for f != "" to prevent a blank line showing up
40 // in profiler statistics. See bug #39524. The root cause
41 // is that the function name is not set for the recurring readline
42 // hook function.
43 if (acc.is_active () && f != "")
40 { 44 {
41 fcn = f; 45 fcn = f;
42 acc.enter_function (fcn); 46 acc.enter_function (fcn);
43 } 47 }
44 else 48 else