imageworks/OpenShadingLanguage — pull request #439 by lgritz (2014-12-03 00:40:57+00:00)
Title: A variety of debugging aids

This is really for my benefit, making life easier as I debug OSL, a variety of little debugging aids and changes:

* Comment out some unnecessarily verbose debugging output.

* Adjustments to the debug_group/debug_layer logic. I changed the logical flow so it's easier to isolate just one layer in just one group for debugging.

* In the OSL end-of-run statistics, where it lists certain options of the ShadingSystem, additionally list the debug and archive group and layer names, so I can see in the stats whether they were specified correctly.

* Found and fixed some bugs in the temporary archive name when serializing the shader group, and also in that context simplified the archive (zip or tar) file to eliminate redundant copies of the same .oso file.

* testshade -group now not only takes a full group serialization in the parameter argument, but can also take a filename, in which case (if the name exists as a file) will read the file containing the serialization. This makes it easier for long serializations to be imported to testshade.

* Changed some internal APIs to take string_view rather than const char* when passing "why" parameters to certain runtime optimizations (these are only used when certain debugging modes are turned on, for me to hunt through the logs to understand exactly why some code transformations take place).

* An internal "stop_optimizing" flag in the RuntimeOptimizer, which a particular optimization can set, for debugging purposes, to ensure that no *further* optimizations happen, so that I can examine the code state immediately after a suspect optimization occurs.

Don't be alarmed by this... I have no indication that there are important bugs in the released code. I did these things while working on some new code that I haven't yet posted, but the debug scaffolding itself was getting big and I wanted to cleave part off for a separate review.