bugGNU Octave - Bugs: bug #38480, profile does not report the...

 
 

bug #38480: profile does not report the classname when a class function is called

Submitter:  Julien Bect <jbect>
Submitted:  Wed 06 Mar 2013 09:02:13 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 15 May 2014 12:49:57 AM UTC, comment #1: 

Fixed on the development branch in this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/e70373a98ffe).

Rik <rik5>
Group administrator
Wed 06 Mar 2013 09:02:13 PM UTC, original submission:  

The profile() function does not report the classname in FunctionName when a class function is called (Matlab does).

As a consequence, when looking at the FunctionTable, it is not possible to know if a base function or an overloaded function has been called.

Worse, if both the base function and an overloaded function are successively called, both calls are reported in the same entry of the FunctionTable.


./run-octave # from the root of the build tree

octave:1> addpath("./examples")

octave:2> profile on

octave:3> display('toto')
toto

octave:4> s1 = profile('info');

octave:5> polynomial(3)
ans = 3

octave:6> s2 = profile('info');

octave:7> find(strcmp('display', {s1.FunctionTable.FunctionName}))
ans =  1

octave:8> s1.FunctionTable(1)
ans =

  scalar structure containing the fields:

    FunctionName = display
    TotalTime =  1.8287e-04
    NumCalls =  1
    IsRecursive = 0
    Parents = [](1x0)
    Children =

       2   3   4   5   6

octave:9> find(strcmp('display', {s2.FunctionTable.FunctionName}))
ans =  1

octave:10> s2.FunctionTable(1)
ans =

  scalar structure containing the fields:

    FunctionName = display
    TotalTime =  0.039065
    NumCalls =  2
    IsRecursive = 0
    Parents = [](1x0)
    Children =

        2    3    4    5    6   11   19   20   26   27   28   29   30   31


Julien Bect <jbect>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by jbect (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-05-15 rik5 StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code