)]}'
{
  "commit": "3a6c51e4d66cf2fbc05583247b2d2f1179e8a74c",
  "tree": "5ab2ae177f52943c609ca5ca1d8702b0c13a27ac",
  "parents": [
    "e9cfa47e687d77d256610b7124d736776f137ea0"
  ],
  "author": {
    "name": "Jiri Olsa",
    "email": "jolsa@redhat.com",
    "time": "Fri Apr 17 00:14:05 2020 +0200"
  },
  "committer": {
    "name": "Arnaldo Carvalho de Melo",
    "email": "acme@redhat.com",
    "time": "Sat Apr 18 09:05:00 2020 -0300"
  },
  "message": "perf parser: Add support to specify rXXX event with pmu\n\nThe current rXXXX event specification creates event under PERF_TYPE_RAW\npmu type. This change allows to use rXXXX within pmu syntax, so it\u0027s\ntype is used via the following syntax:\n\n  -e \u0027cpu/r3c/\u0027\n  -e \u0027cpum_cf/r0/\u0027\n\nThe XXXX number goes directly to perf_event_attr::config the same way as\nin \u0027-e rXXXX\u0027 event. The perf_event_attr::type is filled with pmu type.\n\nCommitter testing:\n\nSo, lets see what goes in perf_event_attr::config for, say, the\n\u0027instructions\u0027 PERF_TYPE_HARDWARE (0) event, first we should look at how\nto encode this event as a PERF_TYPE_RAW event for this specific CPU, an\nAMD Ryzen 5:\n\n  # cat /sys/devices/cpu/events/instructions\n  event\u003d0xc0\n  #\n\nThen try with it _and_ the instruction, just to see that they are close\nenough:\n\n  # perf stat -e rc0,instructions sleep 1\n\n   Performance counter stats for \u0027sleep 1\u0027:\n\n             919,794      rc0\n             919,898      instructions\n\n         1.000754579 seconds time elapsed\n\n         0.000715000 seconds user\n         0.000000000 seconds sys\n  #\n\nNow we should try, before this patch, the PMU event encoding:\n\n  # perf stat -e cpu/rc0/ sleep 1\n  event syntax error: \u0027cpu/rc0/\u0027\n                           \\___ unknown term\n\n  valid terms: event,edge,inv,umask,cmask,config,config1,config2,name,period,percore\n  #\n\nNow with this patch, the three ways of specifying the \u0027instructions\u0027 CPU\ncounter are accepted:\n\n  # perf stat -e cpu/rc0/,rc0,instructions sleep 1\n\n   Performance counter stats for \u0027sleep 1\u0027:\n\n             892,948      cpu/rc0/\n             893,052      rc0\n             893,156      instructions\n\n         1.000931819 seconds time elapsed\n\n         0.000916000 seconds user\n         0.000000000 seconds sys\n\n  #\n\nRequested-by: Thomas Richter \u003ctmricht@linux.ibm.com\u003e\nSigned-off-by: Jiri Olsa \u003cjolsa@kernel.org\u003e\nTested-by: Arnaldo Carvalho de Melo \u003cacme@redhat.com\u003e\nTested-by: Thomas Richter \u003ctmricht@linux.ibm.com\u003e\nCc: Alexander Shishkin \u003calexander.shishkin@linux.intel.com\u003e\nCc: Michael Petlan \u003cmpetlan@redhat.com\u003e\nCc: Namhyung Kim \u003cnamhyung@kernel.org\u003e\nCc: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nCc: Sumanth Korikkar \u003csumanthk@linux.ibm.com\u003e\nCc: Vasily Gorbik \u003cgor@linux.ibm.com\u003e\nLink: http://lore.kernel.org/lkml/20200416221405.437788-1-jolsa@kernel.org\nSigned-off-by: Arnaldo Carvalho de Melo \u003cacme@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "cb23667531ab0a74a33332d9ca9e6e69595e791a",
      "old_mode": 33188,
      "old_path": "tools/perf/Documentation/perf-list.txt",
      "new_id": "376a50b3452d0cc19d5e00da86572c0abe776494",
      "new_mode": 33188,
      "new_path": "tools/perf/Documentation/perf-list.txt"
    },
    {
      "type": "modify",
      "old_id": "091c3aeccc2798a1c32f08069ccd06b32d4154bb",
      "old_mode": 33188,
      "old_path": "tools/perf/tests/parse-events.c",
      "new_id": "902bd9d591a066c27bc5340c357e25a840b7fade",
      "new_mode": 33188,
      "new_path": "tools/perf/tests/parse-events.c"
    },
    {
      "type": "modify",
      "old_id": "baa48f28d57d56c7dd8f8374583440842b61c65f",
      "old_mode": 33188,
      "old_path": "tools/perf/util/parse-events.l",
      "new_id": "c589fc42f0586a214a80f5ba6abc86c02cf5b4b9",
      "new_mode": 33188,
      "new_path": "tools/perf/util/parse-events.l"
    },
    {
      "type": "modify",
      "old_id": "94f8bcd835826de88b83c8df50141bafdffce7f2",
      "old_mode": 33188,
      "old_path": "tools/perf/util/parse-events.y",
      "new_id": "e879eb257874b190b667fce4112eccb8d5deef0f",
      "new_mode": 33188,
      "new_path": "tools/perf/util/parse-events.y"
    }
  ]
}
