octave-maintainers
[Top][All Lists]
Advanced

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

Re: Sample Matlab profiler output


From: Daniel Kraft
Subject: Re: Sample Matlab profiler output
Date: Thu, 14 Jul 2011 19:55:30 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.2.18) Gecko/20110616 Lightning/1.0b2 Thunderbird/3.1.11

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/14/11 19:24, Jordi Gutiérrez Hermoso wrote:
>>From asking around in ##matlab in IRC, someone helpfully offered the
> following profiler output from Matlab:
> 
>      http://jordi.platinum.linux.pl/octave/matlab-profiler-output.tar.gz
> 
> Note that it also produces HTML output, but we can worry about that at
> the very last or perhaps even after the GSoC project. We certainly
> don't need to produce identical HTML output. The .mat is in two
> formats, but I think Octave can only load stuff-v7.mat, or else I'm
> doing something wrong with my Octave build.

Thanks!  From the documentation, it seems that 'profile' doesn't even
generate any 'human usable' output itself; just a structure of profiling
data, similarly to what profiler_data in my last patch does.

The HTML is seemingly generated by profsave, but if you think so we can
very well delay implementing this function until later.  Currently I'm
working on implementing parts of 'profile', and later I'll try to add
missing backend information like number of calls to a function, whether
it is recursive or not and the child/parent functions.  That seems to be
straight-forward and easy to do.

In order to generate useful output even without profsave, what do you
think about extending either profile via, e.g., profile('print') to
print a flat-profile as ASCII table of the hottest functions?  (Possibly
with number of functions to print specifiable as argument)?  That's
exactly the sort of output I would probably expect and use most often,
but I'm also using gprof on the command-line.

Or maybe it would be nicer to leave the 'profile' function the way it
is, and add 'profshow' to do the job?  The workflow would then be
something like:

profile on;
...do something...
profile off;
data = profile ('info');
profshow (data);

What do you (and the others) think about that?  Or is there even a
Matlab interface that does neither print HTML nor use the GUI, which we
could try to replicate?  I didn't find one.

Yours,
Daniel

PS: Right now, my .m file is in "scripts/general".  Is this ok?  Or
should we create possibly a dedicated directory for the profiler, which
would later contain profile, profshow, profsave and possibly other
routines for other output formats (if we don't use profsave for that
purpose)?

- -- 
OpenPGP: 3BA2 3DDB 7758 F010 BDAB 0DCF 527E 79BA A3B5 3998
- --
Done:  Arc-Bar-Cav-Kni-Ran-Rog-Sam-Tou-Val-Wiz
To go: Hea-Mon-Pri
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOHy2RAAoJEFJ+ebqjtTmY60MQAKq0lHwVNm/O9fb1HX/JG9DB
wA62LwvojaOqJxIg89u6KDsjxU0/8Hhn3SE7hp4KIc/o2tt5c2kTudfHwNV+vzMP
EMR+FjUYZMhcvAReacVWNFC7eVkqcwkTao81uumkEv7g8mAAfZIZu908zWrPdNUr
Wws3Wgk1wOrKZQuhNAohC31D2XbxUOcB6iY+O6ybrrrfz5zowjDjzrOhYs1MgFRX
QSsEeuNScs7ZDjroSsoCp7NdG2lvP9joB6t0okqromRYIdmRpZ0FJhK2Z4L3PCO+
jKGXTOs/9SzfqIrYI5DNoPAkmxwnexoSJBm2Wf+h8aScOEXtlLaczXye09QZ3NHU
w1jUdOIuPxiikZKqyN2Irs/mCTQb97RahL9EnIzryrr3MyPgtg7MsBF8r3z2sNO1
JhwzHVJBf9CPQ9LtGh0sChx1/iTssPMSVL63Rs/swmeVUmZW6F3YrMa6syPf3mNX
rIyXMIh6cJfCz257SjW1BCfEhFNy+/p1J666MGoyeya5iArnJP0OPSZadkaxGgoP
HlpOqBNfthw5Vq5qb1o3yLsTe7JL60KB2c5LKBmufcbz66J3jtApD6EbSxtLVvII
YmRb7ooesXCrCscrB/Pz/KcqPjGJ2JgcN3zobEjrk5ZVMUbbT6QmBWg3Y4/itViv
PL13NVPirA73fhI4EHvS
=aZFb
-----END PGP SIGNATURE-----


reply via email to

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