diff options
author | Kan Liang <kan.liang@linux.intel.com> | 2022-09-01 06:09:59 -0700 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2022-09-06 11:33:03 +0200 |
commit | ee9db0e14b0575aa827579dc2471a29ec5fc6877 (patch) | |
tree | 6cba0ca6f1813ad4fe26b2699220c5bb6bc196a0 /kernel/events | |
parent | e16fd7f2cb1a65555cfe76f983eaefb1eab7471f (diff) |
perf: Use sample_flags for txn
Use the new sample_flags to indicate whether the txn field is filled by
the PMU driver.
Remove the txn field from the perf_sample_data_init() to minimize the
number of cache lines touched.
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220901130959.1285717-7-kan.liang@linux.intel.com
Diffstat (limited to 'kernel/events')
-rw-r--r-- | kernel/events/core.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c index 163e2f478e61..15d27b14c827 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -7414,6 +7414,9 @@ void perf_prepare_sample(struct perf_event_header *header, if (filtered_sample_type & PERF_SAMPLE_DATA_SRC) data->data_src.val = PERF_MEM_NA; + if (filtered_sample_type & PERF_SAMPLE_TRANSACTION) + data->txn = 0; + if (sample_type & PERF_SAMPLE_REGS_INTR) { /* regs dump ABI info */ int size = sizeof(u64); |