IA-32 Software Developer's Manual says:
For the Pentium 4 and Intel Xeon processors, a write or a snoop of an instruction in a code segment, where the target instruction is already decoded and resident in the trace cache, invalidates the entire trace cache.
Does every executed instruction get into the trace cache? If an instruction, which was executed only once but very recently, is modified, will that invalidate the trace cache?
Does this also mean that if code is read as data, the trace cache can be invalidated?
Are algorithms used by trace cache in Intel's processors described anywhere?