[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Patch] FIrst experimental profiler
From: |
Daniel Kraft |
Subject: |
Re: [Patch] FIrst experimental profiler |
Date: |
Thu, 14 Jul 2011 16:29:31 +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
Hi,
On 07/14/11 16:18, Jordi Gutiérrez Hermoso wrote:
> Yes. Also, it's customary to not error out at that stage over extra
> output argument. The interpreter already handles this in general. Try
> it:
>
> [a,b] = sin(pi)
>
> so I also removed the checks for that, plus a few comments that seemed
> were explaining something that I thought was too obvious from just
> reading the code.
that sounds alright!
>> And I agree that after that, we should think about real hierarchical
>> output. I like the idea by Andy Wingo and Paolo Bonzini that we
>> might output data in gprof or callgrind format so that we can reuse
>> that tools - -- at least as an option; so maybe I'll look at this
>> more closely.
>
> This would be very nice, but consider that an extra feature for now.
> Focus immediately on the Matlab interface and then on producing
> hierarchical output, by whatever means possible. This is the interface
> we need:
>
> http://www.mathworks.com/help/techdoc/ref/profile.html
>
> Just to make sure, you're aware that in this language
>
> foo bar
> foo("bar")
>
> and
>
> baz -quux
> baz("-quux")
>
> are completely equivalent function calls, right? Implementing the
> interface with m-scripts is thus a matter of parsing string options to
> a profile function.
Yes, I was aware of that. But thanks for the link to the profile
documentation -- I think I found that one on Google already in the past,
but this looks in any case "official" (and I was not sure whether my
last result was in fact by MathWorks themselves).
>> BTW, does Matlab support hierarchical output with a "standard"
>> interface? I don't remember I read about this when looking up
>> "profile".
>
> I don't know. We need input from someone who uses Matlab. I'll ask
> around in IRC. Can someone here in the mailing list tell us how the
> Matlab output looks? We might not need to cosmetically mimic it
> exactly, but at least functionally yes.
If you find something out, let me know; then I can try to come as close
as possible.
>> With count operators you mean profiling per line or "just" to count
>> the number of statements executed alongside the time?
>
> I mean operators are functions so they should be treated the same as
> functions in the profiler output. Octave actually has named functions
> for I think all operators except indexing and range operators, so for
> example,
>
> x = A\b;
> x = mldivide(A,b);
>
> are completely equivalent function calls, but your profiler only
> catches the second one and doesn't report at all the first one. I'm
> not sure if the parser translates operators to their equivalent named
> functions, perhaps jwe or someone else can comment on how this part
> works.
Ah, I see. This makes sense, and after the interface stuff I'll try to
make it work also for the operators. Maybe we need to hook into yet
another ov_-class?
Yours,
Daniel
- --
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/
iQIcBAEBAgAGBQJOHv1KAAoJEFJ+ebqjtTmYm/MP/RP6BkD+zz/t90O9h6V67WaN
kF6i2N/yuXdPPJvO5O4ncffpDmVfJl+L++Zt0XXyC3QKwHqYsfAJDHMJwrSlKuMc
YxN8Y+JqSRe82vVX/SOBISLDN3isGpXehezCPjOWqmhUGBGjlMcwO11TtWJseQYN
tbDFWNwmY65ecMx3ySbRCEJSmnbmWhwZ4dC9+z09gm3gqqBnNVL709E8cBipqdYN
55lf1l5zPs4tDzDv6invl3nubX+NYYxvHnq+0tfSIekwREre1SunQKQBjWKbxr45
+k+RUh/HgnefMWLGU22uEMT7if7VoW2kpRrSpyZ4Kar4yJt3gU/mBBx9nYsGdmtZ
SQAs4Yb1FYuuXVXFBLE2k8WBL/OGRfHQZkxBQV4uuvUD1FkNpaOAzeSqIZ9ohKLC
NJ9yof/yDq/bG49aAZZX6jysieBUhQE9POdAETNL0VjpmBO5Sl3xP168uXy74mQU
1sxhH2ImkK9kjkWs9DG/8W2bwEublSFzS2oW+qrnBFg3K0LWagkNX5ghheMfAjc2
MNLPU8ViyddG4dlsigvZJoU8ER6+IpkfnG6Y2SMm4TZiAx+XJu16wHBFbjH6hXtw
6NcyDWbX8jUepUcoVqHIYI1JglpaPS4/RIyQLNmPtC+cuhzC6fSaKWklxGy3c4Jf
sFP5xi7BLnNLiCws+rn0
=QunM
-----END PGP SIGNATURE-----