perf_event.c (e199e6136ce6b151e6638ae93dca60748424d900) | perf_event.c (51b0fe39549a04858001922919ab355dee9bdfcf) |
---|---|
1/* 2 * Performance event support framework for SuperH hardware counters. 3 * 4 * Copyright (C) 2009 Paul Mundt 5 * 6 * Heavily based on the x86 and PowerPC implementations. 7 * 8 * x86: --- 243 unchanged lines hidden (view full) --- 252 return 0; 253} 254 255static void sh_pmu_read(struct perf_event *event) 256{ 257 sh_perf_event_update(event, &event->hw, event->hw.idx); 258} 259 | 1/* 2 * Performance event support framework for SuperH hardware counters. 3 * 4 * Copyright (C) 2009 Paul Mundt 5 * 6 * Heavily based on the x86 and PowerPC implementations. 7 * 8 * x86: --- 243 unchanged lines hidden (view full) --- 252 return 0; 253} 254 255static void sh_pmu_read(struct perf_event *event) 256{ 257 sh_perf_event_update(event, &event->hw, event->hw.idx); 258} 259 |
260static const struct pmu pmu = { | 260static struct pmu pmu = { |
261 .enable = sh_pmu_enable, 262 .disable = sh_pmu_disable, 263 .read = sh_pmu_read, 264}; 265 | 261 .enable = sh_pmu_enable, 262 .disable = sh_pmu_disable, 263 .read = sh_pmu_read, 264}; 265 |
266const struct pmu *hw_perf_event_init(struct perf_event *event) | 266struct pmu *hw_perf_event_init(struct perf_event *event) |
267{ 268 int err = __hw_perf_event_init(event); 269 if (unlikely(err)) { 270 if (event->destroy) 271 event->destroy(event); 272 return ERR_PTR(err); 273 } 274 --- 56 unchanged lines hidden --- | 267{ 268 int err = __hw_perf_event_init(event); 269 if (unlikely(err)) { 270 if (event->destroy) 271 event->destroy(event); 272 return ERR_PTR(err); 273 } 274 --- 56 unchanged lines hidden --- |