1. 14 8月, 2019 1 次提交
  2. 30 7月, 2019 3 次提交
    • J
      libperf: Move perf_event_attr field from perf's evsel to libperf's perf_evsel · 1fc632ce
      Jiri Olsa 提交于
      Move the perf_event_attr struct fron 'struct evsel' to 'struct perf_evsel'.
      
      Committer notes:
      
      Fixed up these:
      
       tools/perf/arch/arm/util/auxtrace.c
       tools/perf/arch/arm/util/cs-etm.c
       tools/perf/arch/arm64/util/arm-spe.c
       tools/perf/arch/s390/util/auxtrace.c
       tools/perf/util/cs-etm.c
      
      Also
      
        cc1: warnings being treated as errors
        tests/sample-parsing.c: In function 'do_test':
        tests/sample-parsing.c:162: error: missing initializer
        tests/sample-parsing.c:162: error: (near initialization for 'evsel.core.cpus')
      
         	struct evsel evsel = {
         		.needs_swap = false,
        -		.core.attr = {
        -			.sample_type = sample_type,
        -			.read_format = read_format,
        +		.core = {
        +			. attr = {
        +				.sample_type = sample_type,
        +				.read_format = read_format,
        +			},
      
        [perfbuilder@a70e4eeb5549 /]$ gcc --version |& head -1
        gcc (GCC) 4.4.7
      
      Also we don't need to include perf_event.h in
      tools/perf/lib/include/perf/evsel.h, forward declaring 'struct
      perf_event_attr' is enough. And this even fixes the build in some
      systems where things are used somewhere down the include path from
      perf_event.h without defining __always_inline.
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Michael Petlan <mpetlan@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20190721112506.12306-43-jolsa@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      1fc632ce
    • J
      perf evlist: Rename struct perf_evlist to struct evlist · 63503dba
      Jiri Olsa 提交于
      Rename struct perf_evlist to struct evlist, so we don't have a name
      clash when we add struct perf_evlist in libperf.
      
      Committer notes:
      
      Added fixes to build on arm64, from Jiri and from me
      (tools/perf/util/cs-etm.c)
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Michael Petlan <mpetlan@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20190721112506.12306-6-jolsa@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      63503dba
    • J
      perf evsel: Rename struct perf_evsel to struct evsel · 32dcd021
      Jiri Olsa 提交于
      Rename struct perf_evsel to struct evsel, so we don't have a name clash
      when we add struct perf_evsel in libperf.
      
      Committer notes:
      
      Added fixes for arm64, provided by Jiri.
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Michael Petlan <mpetlan@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20190721112506.12306-5-jolsa@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      32dcd021
  3. 09 7月, 2019 2 次提交
    • L
      perf intel-pt: Fix potential NULL pointer dereference found by the smatch tool · 323fd749
      Leo Yan 提交于
      Based on the following report from Smatch, fix the potential NULL
      pointer dereference check.
      
        tools/perf/util/intel-pt.c:3200
        intel_pt_process_auxtrace_info() error: we previously assumed
        'session->itrace_synth_opts' could be null (see line 3196)
      
        tools/perf/util/intel-pt.c:3206
        intel_pt_process_auxtrace_info() warn: variable dereferenced before
        check 'session->itrace_synth_opts' (see line 3200)
      
        tools/perf/util/intel-pt.c
        3196         if (session->itrace_synth_opts && session->itrace_synth_opts->set) {
        3197                 pt->synth_opts = *session->itrace_synth_opts;
        3198         } else {
        3199                 itrace_synth_opts__set_default(&pt->synth_opts,
        3200                                 session->itrace_synth_opts->default_no_sample);
                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
        3201                 if (!session->itrace_synth_opts->default_no_sample &&
        3202                     !session->itrace_synth_opts->inject) {
        3203                         pt->synth_opts.branches = false;
        3204                         pt->synth_opts.callchain = true;
        3205                 }
        3206                 if (session->itrace_synth_opts)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
        3207                         pt->synth_opts.thread_stack =
        3208                                 session->itrace_synth_opts->thread_stack;
        3209         }
      
      'session->itrace_synth_opts' is impossible to be a NULL pointer in
      intel_pt_process_auxtrace_info(), thus this patch removes the NULL test
      for 'session->itrace_synth_opts'.
      Signed-off-by: NLeo Yan <leo.yan@linaro.org>
      Acked-by: NAdrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: http://lkml.kernel.org/r/20190708143937.7722-4-leo.yan@linaro.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      323fd749
    • A
      tools lib: Adopt zalloc()/zfree() from tools/perf · 7f7c536f
      Arnaldo Carvalho de Melo 提交于
      Eroding a bit more the tools/perf/util/util.h hodpodge header.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lkml.kernel.org/n/tip-natazosyn9rwjka25tvcnyi0@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      7f7c536f
  4. 25 6月, 2019 1 次提交
  5. 18 6月, 2019 9 次提交
  6. 11 6月, 2019 3 次提交
  7. 05 6月, 2019 2 次提交
  8. 29 5月, 2019 3 次提交
  9. 02 3月, 2019 1 次提交
  10. 06 2月, 2019 1 次提交
  11. 02 1月, 2019 1 次提交
  12. 06 11月, 2018 1 次提交
  13. 31 10月, 2018 2 次提交
  14. 25 10月, 2018 1 次提交
  15. 21 9月, 2018 1 次提交
  16. 06 6月, 2018 2 次提交
  17. 27 4月, 2018 3 次提交
  18. 08 3月, 2018 3 次提交