Skip to content

Commit

Permalink
deepin: KABI: KABI reservation for perf structures
Browse files Browse the repository at this point in the history
Reserve kabi space for `struct pmu`, `struct perf_event`,
`struct perf_event_context`, `struct perf_cgroup_info` and
`struct perf_sample_data`.

Link:https://gitee.com/openeuler/kernel/issues/I8UOCZ

Signed-off-by: Yang Jihong <yangjihong1@huawei.com>
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
  • Loading branch information
opsiff committed Jan 14, 2025
1 parent 7dcf2c9 commit b9df1a9
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions include/linux/perf_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ struct perf_guest_info_callbacks {
#include <linux/static_call.h>
#include <linux/lockdep.h>
#include <asm/local.h>
#include <linux/deepin_kabi.h>

struct perf_callchain_entry {
__u64 nr;
Expand Down Expand Up @@ -324,6 +325,11 @@ struct pmu {
/* number of address filters this PMU can do */
unsigned int nr_addr_filters;

DEEPIN_KABI_RESERVE(1)
DEEPIN_KABI_RESERVE(2)
DEEPIN_KABI_RESERVE(3)
DEEPIN_KABI_RESERVE(4)

/*
* Fully disable/enable this PMU, can be used to protect from the PMI
* as well as for lazy/batch writing of the MSRs.
Expand Down Expand Up @@ -540,6 +546,11 @@ struct pmu {
* Check period value for PERF_EVENT_IOC_PERIOD ioctl.
*/
int (*check_period) (struct perf_event *event, u64 value); /* optional */

DEEPIN_KABI_RESERVE(5)
DEEPIN_KABI_RESERVE(6)
DEEPIN_KABI_RESERVE(7)
DEEPIN_KABI_RESERVE(8)
};

enum perf_addr_filter_action_t {
Expand Down Expand Up @@ -840,6 +851,13 @@ struct perf_event {
* user.
*/
__u32 orig_type;

DEEPIN_KABI_RESERVE(1)
DEEPIN_KABI_RESERVE(2)
DEEPIN_KABI_RESERVE(3)
DEEPIN_KABI_RESERVE(4)
DEEPIN_KABI_RESERVE(5)
DEEPIN_KABI_RESERVE(6)
#endif /* CONFIG_PERF_EVENTS */
};

Expand Down Expand Up @@ -966,6 +984,11 @@ struct perf_event_context {
* that until the signal is delivered.
*/
local_t nr_pending;

DEEPIN_KABI_RESERVE(1)
DEEPIN_KABI_RESERVE(2)
DEEPIN_KABI_RESERVE(3)
DEEPIN_KABI_RESERVE(4)
};

/*
Expand Down Expand Up @@ -1041,6 +1064,9 @@ struct perf_cgroup_info {
u64 timestamp;
u64 timeoffset;
int active;

DEEPIN_KABI_RESERVE(1)
DEEPIN_KABI_RESERVE(2)
};

struct perf_cgroup {
Expand Down Expand Up @@ -1193,6 +1219,11 @@ struct perf_sample_data {
u64 data_page_size;
u64 code_page_size;
u64 aux_size;

DEEPIN_KABI_RESERVE(1)
DEEPIN_KABI_RESERVE(2)
DEEPIN_KABI_RESERVE(3)
DEEPIN_KABI_RESERVE(4)
} ____cacheline_aligned;

/* default value for data source */
Expand Down

0 comments on commit b9df1a9

Please sign in to comment.