]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge branch 'perf/urgent'
authorIngo Molnar <mingo@kernel.org>
Wed, 23 Oct 2013 07:50:33 +0000 (09:50 +0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 23 Oct 2013 07:50:33 +0000 (09:50 +0200)
1  2 
kernel/events/core.c
tools/perf/util/evsel.c

diff --combined kernel/events/core.c
index c716385f64833c2ca1e9f43526d4d9163c1db150,953c14348375a6d440a904ec7d7e0d3e70d1d767..5bd7fe43a7a22197379991a589fc4185c50a2e0c
@@@ -193,7 -193,7 +193,7 @@@ int perf_proc_update_handler(struct ctl
                void __user *buffer, size_t *lenp,
                loff_t *ppos)
  {
 -      int ret = proc_dointvec(table, write, buffer, lenp, ppos);
 +      int ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
  
        if (ret || !write)
                return ret;
@@@ -1201,9 -1201,6 +1201,9 @@@ static void perf_event__header_size(str
        if (sample_type & PERF_SAMPLE_DATA_SRC)
                size += sizeof(data->data_src.val);
  
 +      if (sample_type & PERF_SAMPLE_TRANSACTION)
 +              size += sizeof(data->txn);
 +
        event->header_size = size;
  }
  
@@@ -4575,9 -4572,6 +4575,9 @@@ void perf_output_sample(struct perf_out
        if (sample_type & PERF_SAMPLE_DATA_SRC)
                perf_output_put(handle, data->data_src.val);
  
 +      if (sample_type & PERF_SAMPLE_TRANSACTION)
 +              perf_output_put(handle, data->txn);
 +
        if (!event->attr.watermark) {
                int wakeup_events = event->attr.wakeup_events;
  
@@@ -6773,6 -6767,10 +6773,10 @@@ static int perf_copy_attr(struct perf_e
        if (ret)
                return -EFAULT;
  
+       /* disabled for now */
+       if (attr->mmap2)
+               return -EINVAL;
        if (attr->__reserved_1)
                return -EINVAL;
  
diff --combined tools/perf/util/evsel.c
index ec0cc1e21c626e3617820039e7a9df4ca60f43eb,9f1ef9bee2d0c96583dac31d4c12bcc220b519bf..3a334f0019979e88ed8fbaa152f2183470c973f5
@@@ -678,12 -678,8 +678,11 @@@ void perf_evsel__config(struct perf_evs
                attr->sample_type       |= PERF_SAMPLE_WEIGHT;
  
        attr->mmap  = track;
-       attr->mmap2 = track && !perf_missing_features.mmap2;
        attr->comm  = track;
  
 +      if (opts->sample_transaction)
 +              attr->sample_type       |= PERF_SAMPLE_TRANSACTION;
 +
        /*
         * XXX see the function comment above
         *
@@@ -986,7 -982,6 +985,7 @@@ static size_t perf_event_attr__fprintf(
        ret += PRINT_ATTR2(exclude_host, exclude_guest);
        ret += PRINT_ATTR2N("excl.callchain_kern", exclude_callchain_kernel,
                            "excl.callchain_user", exclude_callchain_user);
 +      ret += PRINT_ATTR_U32(mmap2);
  
        ret += PRINT_ATTR_U32(wakeup_events);
        ret += PRINT_ATTR_U32(wakeup_watermark);
@@@ -1218,7 -1213,6 +1217,7 @@@ static int perf_evsel__parse_id_sample(
  
                sample->pid = u.val32[0];
                sample->tid = u.val32[1];
 +              array--;
        }
  
        return 0;
@@@ -1458,9 -1452,6 +1457,9 @@@ int perf_evsel__parse_sample(struct per
                        array = (void *)array + sz;
                        OVERFLOW_CHECK_u64(array);
                        data->user_stack.size = *array++;
 +                      if (WARN_ONCE(data->user_stack.size > sz,
 +                                    "user stack dump failure\n"))
 +                              return -EFAULT;
                }
        }
  
                array++;
        }
  
 +      data->transaction = 0;
 +      if (type & PERF_SAMPLE_TRANSACTION) {
 +              data->transaction = *array;
 +              array++;
 +      }
 +
        return 0;
  }