bugGNU Octave - Bugs: bug #64573, VM compiled functions do not...

 
 

bug #64573: VM compiled functions do not appear at all in profiling when using the octave interpreter

Submitter:  None
Submitted:  Sun 20 Aug 2023 01:09:33 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  None Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Open Release:  * dev
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 24 Aug 2023 10:41:39 AM UTC, comment #2: 

The gist is that even when the VM does not support the octave profiler, it would be good to have a total execution time and number of times called of the VM compiled function.

If everything is running through VM,the VM Profiler is fine. But if the "master" is still the octave interpreter for the main execution, one is missing profiling data for the vm compiled functions.

full VM compatibility with octave packages like pythonic and others is not granted and may take a while / if ever. So selective vm compiling is important to support

Anonymous
Mon 21 Aug 2023 08:11:35 PM UTC, comment #1: 

The default profiler is not supported by the VM. You could try the VM profiler. E.g.:


function t
  __vm_profile__
  for i=1:100
     a = betainc (0.5, 1, 3);
  endfor
  __vm_profile__
end



  pkg load statistics; __enable_vm_eval__(1); dbstop sind; t


Petter <petter>
Sun 20 Aug 2023 01:09:33 AM UTC, original submission:  

When using the Octave interpreter but VM-compiling a specific function used, this function does not appear AT ALL in profiling, not even with its (VM external) total execution time and number of calls.

This is unexpected, as the standard octave interpreter is used for the main execution.

As analogy oct-functions have this behavior: (Unsurprisingly) profiling shows no insides but the number of times called and the total execution time. This is not true for VM compiled functions.

Example:

pkg load statistics;
_enable_vm_eval_ (0);
_compile_("betainc");

profile off; profile clear;
profile on;
for i=1:100
   a = betainc (0.5, 1, 3);
endfor
profile off; profshow;
   #    Function Attr     Time (s)   Time (%)        Calls
----------------------------------------------------------
  18        deal             0.002      25.56          100
   2 common_size             0.002      23.18          100
  14       zeros             0.001       8.11          200
  11       class             0.000       5.75          500
   6        find             0.000       5.59          100
   9        size             0.000       4.42          300
   1      nargin             0.000       2.74          501
  26     reshape             0.000       2.64          100
   4     cellfun             0.000       2.26          100
  21 _betainc_             0.000       2.13          100
  12      strcmp             0.000       2.00          300
  16       log1p             0.000       1.92          200
  23      lgamma             0.000       1.82          300
   5   binary !=             0.000       1.79          100
  22         log             0.000       1.55          200
  20     nargout             0.000       1.32          200
  24         exp             0.000       1.09          100
  15     strcmpi             0.000       1.02          200
   8   iscomplex             0.000       0.81          300
  10         any             0.000       0.73          300


_compile_("betainc","clear");
profile off; profile clear;
profile on;
for i=1:100
   a = betainc (0.5, 1, 3);
endfor
profile off; profshow;
   #    Function Attr     Time (s)   Time (%)        Calls
----------------------------------------------------------
   1     betainc             0.022      71.77          100
  31        deal             0.002       5.61          100
   4 common_size             0.002       5.11          100
  28    binary +             0.001       2.29          500
  18       zeros             0.001       1.82          200
  15       class             0.000       1.33          500
   7        find             0.000       1.22          100
  11        size             0.000       1.06          300
  30    binary -             0.000       0.74          400
  38     reshape             0.000       0.64          100
   9    binary >             0.000       0.60          300
  23    prefix -             0.000       0.54          300
  25   binary .*             0.000       0.52          300
   5     cellfun             0.000       0.52          100
  33 _betainc_             0.000       0.52          100
   2      nargin             0.000       0.47          501
  35      lgamma             0.000       0.47          300
  24       log1p             0.000       0.44          200
  16      strcmp             0.000       0.43          300
  34         log             0.000       0.36          200

Anonymous

 

(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 petter (Posted a comment)
  •  

    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.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.14-0608.
    Corresponding source code