)]}'
{
  "commit": "56b03f3c4d641dbdbce2e52a2969712e85b0e030",
  "tree": "3c15eb7ed163ca63bed395b233535f6fca2cccec",
  "parents": [
    "b9a63b9b56d6910a25e3d4905525aef150420a9b"
  ],
  "author": {
    "name": "Arnaldo Carvalho de Melo",
    "email": "acme@redhat.com",
    "time": "Tue Jan 05 16:50:31 2010 -0200"
  },
  "committer": {
    "name": "Ingo Molnar",
    "email": "mingo@elte.hu",
    "time": "Wed Jan 13 10:09:11 2010 +0100"
  },
  "message": "perf tools: Handle relocatable kernels\n\nDSOs don\u0027t have this problem because the kernel emits a\nPERF_MMAP for each new executable mapping it performs on\nmonitored threads.\n\nTo fix the kernel case we simulate the same behaviour, by having\n\u0027perf record\u0027 to synthesize a PERF_MMAP for the kernel, encoded\nlike this:\n\n[root@doppio ~]# perf record -a -f sleep 1\n[ perf record: Woken up 1 times to write data ]\n[ perf record: Captured and wrote 0.344 MB perf.data (~15038 samples) ]\n[root@doppio ~]# perf report -D | head -10\n\n0xd0 [0x40]: event: 1\n.\n. ... raw event: size 64 bytes\n.  0000:  01 00 00 00 00 00 40 00 00 00 00 00 00 00 00 00 ......@........\n.  0010:  00 00 00 81 ff ff ff ff 00 00 00 00 00 00 00 00 ...............\n.  0020:  00 00 00 00 00 00 00 00 5b 6b 65 72 6e 65 6c 2e ........  [kernel\n.  0030:  6b 61 6c 6c 73 79 6d 73 2e 5f 74 65 78 74 5d 00  kallsyms._text]\n.  0xd0\n[0x40]: PERF_RECORD_MMAP 0/0: [0xffffffff81000000((nil)) @ (nil)]: [kernel.kallsyms._text]\n\nI.e. we identify such event as having:\n\n .pid      \u003d 0\n .filename \u003d [kernel.kallsyms.REFNAME]\n .start    \u003d REFNAME addr in /proc/kallsyms at \u0027perf record\u0027 time\n\nand use now a hardcoded value of \u0027.text\u0027 for REFNAME.\n\nThen, later, in \u0027perf report\u0027, if there are any kernel hits and\nthus we need to resolve kernel symbols, we search for REFNAME\nand if its address changed, relocation happened and we thus must\nchange the kernel mapping routines to one that uses .pgoff as\nthe relocation to apply.\n\nThis way we use the same mechanism used for the other DSOs and\ndon\u0027t have to do a two pass in all the kernel symbols.\n\nReported-by: Xiao Guangrong \u003cxiaoguangrong@cn.fujitsu.com\u003e\nSigned-off-by: Arnaldo Carvalho de Melo \u003cacme@redhat.com\u003e\nCc: Frédéric Weisbecker \u003cfweisbec@gmail.com\u003e\nCc: \"H. Peter Anvin\" \u003chpa@zytor.com\u003e\nCc: Mike Galbraith \u003cefault@gmx.de\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Paul Mackerras \u003cpaulus@samba.org\u003e\nCc: Xiao Guangrong \u003cxiaoguangrong@cn.fujitsu.com\u003e\nLKML-Reference: \u003c1262717431-1246-1-git-send-email-acme@infradead.org\u003e\nSigned-off-by: Ingo Molnar \u003cmingo@elte.hu\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "265425322734eecfc3087a7be42a60960c89f2b0",
      "old_mode": 33188,
      "old_path": "tools/perf/builtin-record.c",
      "new_id": "8f88420e066bb9b14fdd1aa0fda69fe6c600a356",
      "new_mode": 33188,
      "new_path": "tools/perf/builtin-record.c"
    },
    {
      "type": "modify",
      "old_id": "bb0fd6da2d56f3850885d1d51df089dccc15d1d6",
      "old_mode": 33188,
      "old_path": "tools/perf/util/event.c",
      "new_id": "1a31feb9999f8fa4043db9b019cc989e9f34bddd",
      "new_mode": 33188,
      "new_path": "tools/perf/util/event.c"
    },
    {
      "type": "modify",
      "old_id": "80fb3653c809c9a23ab138ef3a3277783127b1d9",
      "old_mode": 33188,
      "old_path": "tools/perf/util/event.h",
      "new_id": "61fc0dc658c2f31d8663d36fe6bb269b71a5d8e1",
      "new_mode": 33188,
      "new_path": "tools/perf/util/event.h"
    },
    {
      "type": "modify",
      "old_id": "7f0537d1add8de0039f193798826f8fe1c6f6d31",
      "old_mode": 33188,
      "old_path": "tools/perf/util/session.c",
      "new_id": "e0e6a075489e79ea2d5b6eb767b64eb5163c6c09",
      "new_mode": 33188,
      "new_path": "tools/perf/util/session.c"
    },
    {
      "type": "modify",
      "old_id": "8db37bbf0e626387598102b498041679870e4fce",
      "old_mode": 33188,
      "old_path": "tools/perf/util/session.h",
      "new_id": "d4a9d20f8d444cc534ed8a77a4bccd9d1e0a5ddd",
      "new_mode": 33188,
      "new_path": "tools/perf/util/session.h"
    },
    {
      "type": "modify",
      "old_id": "e290429e9c0075f7b6843771c2624755099d1dc4",
      "old_mode": 33188,
      "old_path": "tools/perf/util/symbol.c",
      "new_id": "da2f07f1af8fc0d3ac45031ca5139d2f02c5dd63",
      "new_mode": 33188,
      "new_path": "tools/perf/util/symbol.c"
    }
  ]
}
