title: How to catch the L3-cache hits and misses by perf tool in Linux
body: <p>Is there any way to catch the L3-cache hits and misses by perf tool in Linux. According to the output of <code>perf list cache</code>, L1 and LLC cache are supported. According to the definition of <a href="http://docs.huihoo.com/doxygen/linux/kernel/3.7/evsel_8c.html#ad29b951a4b280c8e587a3f779656ec62" rel="nofollow">perf_evsel__hw_cache</a> array in perf's source code: </p>
  
  <pre><code>const char *perf_evsel__hw_cache[PERF_COUNT_HW_CACHE_MAX]
                                  [PERF_EVSEL__MAX_ALIASES] = {
   { "L1-dcache", "l1-d",         "l1d",          "L1-data",              },
   { "L1-icache", "l1-i",         "l1i",          "L1-instruction",       },
   { "LLC",       "L2",                                                   },
   { "dTLB",      "d-tlb",        "Data-TLB",                             },
   { "iTLB",      "i-tlb",        "Instruction-TLB",                      },
   { "branch",    "branches",     "bpu",          "btb",          "bpc",  },
   { "node",                                                              },
  };
  </code></pre>
  
  <p>LLC is an alias to L2-cache. My question is how to catch the L3-cache hits and misses by perf tool in Linux. Thanks in advance!</p>