Can anyone please explain what is the exact difference between TOR_INSERT and TOR_OCCUPANCY counters. Although I have read intel documentation I couldn't find an exact definition about these.
These events are defined in the uncore monitoring guide document of the processor of interest. The TOR_INSERT and TOR_OCCUPANCY events are defined as follows in the HSX uncore monitoring guide:
TOR_INSERT: Counts the number of entries successful inserted into the TOR that match qualifications specified by the subevent.
TOR_OCCUPANCY: For each cycle, this event accumulates the number of valid entries in the TOR that match qualifications specified by the subevent.
(Side note: Apparently there is no way to insert quotes in this forum, which is really annoying!)
For example, when a new request is inserted in a TOR that already has 5 pending requests, the following changes occur to the event counters:
If, in a given cycle, there are no new inserts, only the TOR_OCCUPANCY may be incremented according to the occupancy. The TOR_OCCUPANCY event occurs in every cycle in which the TOR is not empty while the TOR_INSERT event occurs only on successful insertions in the TOR.