File tree Expand file tree Collapse file tree 3 files changed +17
-4
lines changed Expand file tree Collapse file tree 3 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -1621,8 +1621,10 @@ static void setup_pebs_fixed_sample_data(struct perf_event *event,
1621
1621
1622
1622
1623
1623
if ((sample_type & PERF_SAMPLE_ADDR_TYPE ) &&
1624
- x86_pmu .intel_cap .pebs_format >= 1 )
1624
+ x86_pmu .intel_cap .pebs_format >= 1 ) {
1625
1625
data -> addr = pebs -> dla ;
1626
+ data -> sample_flags |= PERF_SAMPLE_ADDR ;
1627
+ }
1626
1628
1627
1629
if (x86_pmu .intel_cap .pebs_format >= 2 ) {
1628
1630
/* Only set the TSX weight when no memory weight. */
@@ -1783,8 +1785,10 @@ static void setup_pebs_adaptive_sample_data(struct perf_event *event,
1783
1785
data -> sample_flags |= PERF_SAMPLE_DATA_SRC ;
1784
1786
}
1785
1787
1786
- if (sample_type & PERF_SAMPLE_ADDR_TYPE )
1788
+ if (sample_type & PERF_SAMPLE_ADDR_TYPE ) {
1787
1789
data -> addr = meminfo -> address ;
1790
+ data -> sample_flags |= PERF_SAMPLE_ADDR ;
1791
+ }
1788
1792
1789
1793
if (sample_type & PERF_SAMPLE_TRANSACTION ) {
1790
1794
data -> txn = intel_get_tsx_transaction (meminfo -> tsx_tuning ,
Original file line number Diff line number Diff line change @@ -1028,7 +1028,6 @@ struct perf_sample_data {
1028
1028
* minimize the cachelines touched.
1029
1029
*/
1030
1030
u64 sample_flags ;
1031
- u64 addr ;
1032
1031
struct perf_raw_record * raw ;
1033
1032
u64 period ;
1034
1033
@@ -1040,6 +1039,7 @@ struct perf_sample_data {
1040
1039
union perf_sample_weight weight ;
1041
1040
union perf_mem_data_src data_src ;
1042
1041
u64 txn ;
1042
+ u64 addr ;
1043
1043
1044
1044
u64 type ;
1045
1045
u64 ip ;
@@ -1079,9 +1079,13 @@ static inline void perf_sample_data_init(struct perf_sample_data *data,
1079
1079
{
1080
1080
/* remaining struct members initialized in perf_prepare_sample() */
1081
1081
data -> sample_flags = 0 ;
1082
- data -> addr = addr ;
1083
1082
data -> raw = NULL ;
1084
1083
data -> period = period ;
1084
+
1085
+ if (addr ) {
1086
+ data -> addr = addr ;
1087
+ data -> sample_flags |= PERF_SAMPLE_ADDR ;
1088
+ }
1085
1089
}
1086
1090
1087
1091
/*
Original file line number Diff line number Diff line change @@ -7414,6 +7414,11 @@ void perf_prepare_sample(struct perf_event_header *header,
7414
7414
if (filtered_sample_type & PERF_SAMPLE_TRANSACTION )
7415
7415
data -> txn = 0 ;
7416
7416
7417
+ if (sample_type & (PERF_SAMPLE_ADDR | PERF_SAMPLE_PHYS_ADDR | PERF_SAMPLE_DATA_PAGE_SIZE )) {
7418
+ if (filtered_sample_type & PERF_SAMPLE_ADDR )
7419
+ data -> addr = 0 ;
7420
+ }
7421
+
7417
7422
if (sample_type & PERF_SAMPLE_REGS_INTR ) {
7418
7423
/* regs dump ABI info */
7419
7424
int size = sizeof (u64 );
You can’t perform that action at this time.
0 commit comments