1. A computer-implemented method for calculating an actual footprint of code methods in compiled code, the computer-implemented method comprising: creating, in a computer, a map, wherein the map indicates which code method, in a plurality of code methods, each instruction in the compiled code belongs to; sampling a plurality of executed instructions using a hardware performance counter in the computer; using the created map to map, in the computer, the sampled instructions to the code methods to which the instructions belong; and calculating the actual footprint of each code method as the total number of executed instructions sampled at least once among the instructions belonging to the code methods.