1. A method comprising: monitoring a plurality of entries in a trace cache, wherein each of the plurality of trace cache entries includes a mask portion and a tag portion, wherein the tag portion of each entry is set to a cache line address of a particular instruction in at least one trace cache entry, and the mask portion of each entry is a combination of entities that identify blocks of instructions that the at least one trace cache entry is created from, wherein a mask portion tag portion combination with an address is obtained by: using the address as the tag portion, XORing the address with the tag portion, and ORing a result of the XORing with the mask portion of the tag portion mask portion combination to form a new tag portion mask portion combination; and selectively invalidating the at least one trace cache entry based upon detection of a modification of the at least one cache entry.