)]}'
{
  "commit": "eed01528a45dc4138e9a08064b4b6cc1a9426899",
  "tree": "c7b4256b4158abc74338f14ac2071ec33c52d7e6",
  "parents": [
    "7e55055e5bb00085051ca59c570c83a820e1e0ee"
  ],
  "author": {
    "name": "Stephane Eranian",
    "email": "eranian@google.com",
    "time": "Tue Oct 26 16:08:01 2010 +0200"
  },
  "committer": {
    "name": "Ingo Molnar",
    "email": "mingo@elte.hu",
    "time": "Wed Nov 10 22:58:39 2010 +0100"
  },
  "message": "perf_events: Fix time tracking in samples\n\nThis patch corrects time tracking in samples. Without this patch\nboth time_enabled and time_running are bogus when user asks for\nPERF_SAMPLE_READ.\n\nOne uses PERF_SAMPLE_READ to sample the values of other counters\nin each sample. Because of multiplexing, it is necessary to know\nboth time_enabled, time_running to be able to scale counts correctly.\n\nIn this second version of the patch, we maintain a shadow\ncopy of ctx-\u003etime which allows us to compute ctx-\u003etime without\ncalling update_context_time() from NMI context. We avoid the\nissue that update_context_time() must always be called with\nctx-\u003elock held.\n\nWe do not keep shadow copies of the other event timings\nbecause if the lead event is overflowing then it is active\nand thus it\u0027s been scheduled in via event_sched_in() in\nwhich case neither tstamp_stopped, tstamp_running can be modified.\n\nThis timing logic only applies to samples when PERF_SAMPLE_READ\nis used.\n\nNote that this patch does not address timing issues related\nto sampling inheritance between tasks. This will be addressed\nin a future patch.\n\nWith this patch, the libpfm4 example task_smpl now reports\ncorrect counts (shown on 2.4GHz Core 2):\n\n$ task_smpl -p 2400000000 -e unhalted_core_cycles:u,instructions_retired:u,baclears  noploop 5\nnoploop for 5 seconds\nIIP:0x000000004006d6 PID:5596 TID:5596 TIME:466,210,211,430 STREAM_ID:33 PERIOD:2,400,000,000 ENA\u003d1,010,157,814 RUN\u003d1,010,157,814 NR\u003d3\n\t2,400,000,254 unhalted_core_cycles:u (33)\n\t2,399,273,744 instructions_retired:u (34)\n\t53,340 baclears (35)\n\nSigned-off-by: Stephane Eranian \u003ceranian@google.com\u003e\nSigned-off-by: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nLKML-Reference: \u003c4cc6e14b.1e07e30a.256e.5190@mx.google.com\u003e\nSigned-off-by: Ingo Molnar \u003cmingo@elte.hu\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "057bf22a8323463a6bd9279d6928d3fea7ed8eb8",
      "old_mode": 33188,
      "old_path": "include/linux/perf_event.h",
      "new_id": "40150f345982cd4fd40e8b80470505e569f05b03",
      "new_mode": 33188,
      "new_path": "include/linux/perf_event.h"
    },
    {
      "type": "modify",
      "old_id": "517d827f498281da50210aa76a02b4693116154a",
      "old_mode": 33188,
      "old_path": "kernel/perf_event.c",
      "new_id": "cb6c0d2af68f64b16bd0557f3c7fb7001151b71d",
      "new_mode": 33188,
      "new_path": "kernel/perf_event.c"
    }
  ]
}
