(wip) Add Linux perf JIT support (/tmp/perf-$pid.map)

'perf' is the standard builtin tool for performance analysis on recent
Linux kernel. Its source code is shipped within the kernel repository.

'perf' has basic support for JIT. For each process, it can read a file
named /tmp/perf-$PID.map. This file contains mapping from address
range to function name in the format:

  41187e2a 1a JIT_PPC_b804a33fc

with the following entries:

 1. address of the start of the range (hexadecimal);
 2. size of the range (hexadecimal);
 3. name of the function.

Currently, we supply the address of the basic block instead of a
function name.

Usage:

    DOLPHIN_PERF=1 dolphin-emu &
    perf record -F99 -p $(pgrep dolphin-emu) --cal-graph dwarf
    perf script | stackcollapse-perf.pl | grep JIT_PPC_ | flamegraph.pl > profile.svg

Issues:

  * perf does not have support for region invalidation. It reads the
    file in preprocessing. It does not work very well if a JIT region
    is reused for another basic block. Can we avoid this?

To be fixed:

  * Add a GUI option.

Long term evolutions:

  * add the function name as well in the file;
  * add support for ARM JIT;
  * add support for DSP JIT as well;
  * stack unwinding for JIT functions.

Generated [FlameGraph](http://www.brendangregg.com/flamegraphs.html) :

<a href="http://www.gabriel.urdhr.fr/img/dolphin-flamegraph.svg"><img src="http://www.gabriel.urdhr.fr/img/dolphin-flamegraph.svg" /></a>

(Here we are sampling on time but it is possible to sample cache-misses …)
Is this (pid_t is int) true as well on other OSes (Mac OS X?). I found some references which claims it is.