perf/core: Add PERF_SAMPLE_WEIGHT_STRUCT
[linux-2.6-microblaze.git] / arch / x86 / events / intel / ds.c
index 67dbc91..2f54b1f 100644 (file)
@@ -960,7 +960,8 @@ static void adaptive_pebs_record_size_update(void)
 }
 
 #define PERF_PEBS_MEMINFO_TYPE (PERF_SAMPLE_ADDR | PERF_SAMPLE_DATA_SRC |   \
-                               PERF_SAMPLE_PHYS_ADDR | PERF_SAMPLE_WEIGHT | \
+                               PERF_SAMPLE_PHYS_ADDR |                      \
+                               PERF_SAMPLE_WEIGHT_TYPE |                    \
                                PERF_SAMPLE_TRANSACTION |                    \
                                PERF_SAMPLE_DATA_PAGE_SIZE)
 
@@ -987,7 +988,7 @@ static u64 pebs_update_adaptive_cfg(struct perf_event *event)
        gprs = (sample_type & PERF_SAMPLE_REGS_INTR) &&
               (attr->sample_regs_intr & PEBS_GP_REGS);
 
-       tsx_weight = (sample_type & PERF_SAMPLE_WEIGHT) &&
+       tsx_weight = (sample_type & PERF_SAMPLE_WEIGHT_TYPE) &&
                     ((attr->config & INTEL_ARCH_EVENT_MASK) ==
                      x86_pmu.rtm_abort_event);
 
@@ -1369,8 +1370,8 @@ static void setup_pebs_fixed_sample_data(struct perf_event *event,
        /*
         * Use latency for weight (only avail with PEBS-LL)
         */
-       if (fll && (sample_type & PERF_SAMPLE_WEIGHT))
-               data->weight = pebs->lat;
+       if (fll && (sample_type & PERF_SAMPLE_WEIGHT_TYPE))
+               data->weight.full = pebs->lat;
 
        /*
         * data.data_src encodes the data source
@@ -1462,8 +1463,8 @@ static void setup_pebs_fixed_sample_data(struct perf_event *event,
 
        if (x86_pmu.intel_cap.pebs_format >= 2) {
                /* Only set the TSX weight when no memory weight. */
-               if ((sample_type & PERF_SAMPLE_WEIGHT) && !fll)
-                       data->weight = intel_get_tsx_weight(pebs->tsx_tuning);
+               if ((sample_type & PERF_SAMPLE_WEIGHT_TYPE) && !fll)
+                       data->weight.full = intel_get_tsx_weight(pebs->tsx_tuning);
 
                if (sample_type & PERF_SAMPLE_TRANSACTION)
                        data->txn = intel_get_tsx_transaction(pebs->tsx_tuning,
@@ -1577,8 +1578,8 @@ static void setup_pebs_adaptive_sample_data(struct perf_event *event,
        }
 
        if (format_size & PEBS_DATACFG_MEMINFO) {
-               if (sample_type & PERF_SAMPLE_WEIGHT)
-                       data->weight = meminfo->latency ?:
+               if (sample_type & PERF_SAMPLE_WEIGHT_TYPE)
+                       data->weight.full = meminfo->latency ?:
                                intel_get_tsx_weight(meminfo->tsx_tuning);
 
                if (sample_type & PERF_SAMPLE_DATA_SRC)