1. A computer program product for controlling tracing within a processing environment, said computer program product comprising: a non-transitory computer readable storage medium readable by a processing circuit and storing instructions for execution by the processing circuit for performing a method comprising; compiling, by a dynamic compiler of an emulator running on a native processor, guest code for which one or more traces are to be produced, the emulator emulating a guest architecture on the native processor including emulating execution of the guest code on the native processor, the guest code developed for a processor of the guest architecture; automatically determining, by the compiler during the compiling, based on the compiled code itself, where one or more trace directives are to be included in the compiled code, wherein the automatically determining comprises examining the compiled code, by the compiler, for at least one of an entry point or an exit point for the compiled code and selecting by the compiler the at least one entry point or exit point as a place to include the one or more trace directives; and automatically including, by the compiler during the compiling, the one or more trace directives in the compiled code based on the automatically determining, said one or more trace directives setting a start or end point for use by the emulator in mapping one or more trace statements to the compiled code.