[Mono-bugs] [Bug 487410] mprof-decoder finds unknown directive LAST

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Apr 22 04:09:47 EDT 2009


User massi at ximian.com added comment

Massimiliano Mantione <massi at ximian.com> changed:

           What    |Removed                     |Added
                 CC|                            |massi at ximian.com

--- Comment #3 from Massimiliano Mantione <massi at ximian.com>  2009-04-22 02:09:46 MDT ---
I see what you mean by "graceful degradation".

However in this case I don't think it's feasible.
Or, better, we are *already* degrading gracefully: the decoder works if it does
not see new profiler features in the mprof file.

I could have used a simple version number, then the decoder would stopped
working completely on newer mprof file versions.
Instead I write in the log file some sort of "flags" (the directives) that
instruct the decoder about file format changes, and I write them only if the
feature is actually used in the file.

This way an old decoder will work also on newer "file versions" as long as the
file format is compatible.
But if the byte format has changed, well... you really need a new decoder.
The directive is there to tell the old decoder "please give up, this file is
just rubbish for you".

Of course the error message should suggest you that you need a new decoder, on
this you are right, the solution is not self-evident.
I'll surely change the error message :-)

Does this make sense?

Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list