octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #38480] profile does not report the classname


From: Julien Bect
Subject: [Octave-bug-tracker] [bug #38480] profile does not report the classname when a class function is called
Date: Wed, 06 Mar 2013 21:02:14 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:19.0) Gecko/20100101 Firefox/19.0

URL:
  <http://savannah.gnu.org/bugs/?38480>

                 Summary: profile does not report the classname when a class
function is called
                 Project: GNU Octave
            Submitted by: jbect
            Submitted on: mer. 06 mars 2013 21:02:13 GMT
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: GNU/Linux

    _______________________________________________________

Details:

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







    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?38480>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]