-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathlinux-v6.3.patch
46 lines (41 loc) · 1.64 KB
/
linux-v6.3.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
From 79d4be71039d166ad6df3dcfd1f54151af23b4b5 Mon Sep 17 00:00:00 2001
From: Dongli Zhang <dongli.zhang0129@gmail.com>
Date: Fri, 2 Jun 2023 06:37:22 -0700
Subject: [PATCH 1/1] linux v6.3
Signed-off-by: Dongli Zhang <dongli.zhang0129@gmail.com>
---
arch/arm64/kvm/pmu-emul.c | 5 +++++
kernel/events/core.c | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/arch/arm64/kvm/pmu-emul.c b/arch/arm64/kvm/pmu-emul.c
index 5eca0cdd9..46416824e 100644
--- a/arch/arm64/kvm/pmu-emul.c
+++ b/arch/arm64/kvm/pmu-emul.c
@@ -457,6 +457,11 @@ static void kvm_pmu_counter_increment(struct kvm_vcpu *vcpu,
}
/* Compute the sample period for a given counter value */
+/*
+ * called by:
+ * - arch/arm64/kvm/pmu-emul.c|491| <<kvm_pmu_perf_overflow>> period = compute_period(pmc, local64_read(&perf_event->count));
+ * - arch/arm64/kvm/pmu-emul.c|627| <<kvm_pmu_create_perf_event>> attr.sample_period = compute_period(pmc, kvm_pmu_get_pmc_value(pmc));
+ */
static u64 compute_period(struct kvm_pmc *pmc, u64 counter)
{
u64 val;
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 435815d3b..cc8ed51be 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -5394,6 +5394,11 @@ static int perf_release(struct inode *inode, struct file *file)
return 0;
}
+/*
+ * called by:
+ * - kernel/events/core.c|5432| <<perf_event_read_value>> count = __perf_event_read_value(event, enabled, running);
+ * - kernel/events/core.c|5543| <<perf_read_one>> values[n++] = __perf_event_read_value(event, &enabled, &running);
+ */
static u64 __perf_event_read_value(struct perf_event *event, u64 *enabled, u64 *running)
{
struct perf_event *child;
--
2.34.1