Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1265cc36 authored by tor-jeremiassen's avatar tor-jeremiassen Committed by Mathieu Poirier
Browse files

perf tools: decoding capailitity for CoreSight traces

Added user space perf functionality for CoreSight trace decoding.
parent 56139d02
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -77,6 +77,9 @@ include config/utilities.mak
# Define NO_AUXTRACE if you do not want AUX area tracing support
#
# Define NO_LIBBPF if you do not want BPF support
#
# Define NO_CSTRACE if you do not want CoreSight trace decoding support
#

# As per kernel Makefile, avoid funny character set dependencies
unexport LC_ALL
+2 −1
Original line number Diff line number Diff line
@@ -92,7 +92,8 @@ static struct {

		.fields = PERF_OUTPUT_COMM | PERF_OUTPUT_TID |
			      PERF_OUTPUT_CPU | PERF_OUTPUT_TIME |
			      PERF_OUTPUT_EVNAME | PERF_OUTPUT_IP |
			      PERF_OUTPUT_EVNAME | PERF_OUTPUT_ADDR |
                              PERF_OUTPUT_IP |
			      PERF_OUTPUT_SYM | PERF_OUTPUT_DSO |
			      PERF_OUTPUT_PERIOD,

+18 −0
Original line number Diff line number Diff line
@@ -433,6 +433,24 @@ endif
grep-libs  = $(filter -l%,$(1))
strip-libs = $(filter-out -l%,$(1))

ifdef CSTRACE_PATH
  ifeq (${IS_64_BIT}, 1)
    CSTRACE_LNX = linux64
  else
    CSTRACE_LNX = linux
  endif
  ifdef DEBUG
    LIBCSTRACE = -lcstraced_c_api -lcstraced
    CSTRACE_LIB_PATH = $(CSTRACE_PATH)/lib/$(CSTRACE_LNX)/dbg
  else
    LIBCSTRACE = -lcstrace_c_api -lcstrace
    CSTRACE_LIB_PATH = $(CSTRACE_PATH)/lib/$(CSTRACE_LNX)/rel
  endif
  $(call detected,CSTRACE)
  $(call detected_var,CSTRACE_PATH)
  EXTLIBS += -L$(CSTRACE_LIB_PATH) $(LIBCSTRACE) -lstdc++
endif

ifdef NO_LIBPERL
  CFLAGS += -DNO_LIBPERL
else
+2 −0
Original line number Diff line number Diff line
@@ -84,6 +84,8 @@ libperf-$(CONFIG_AUXTRACE) += auxtrace.o
libperf-$(CONFIG_AUXTRACE) += intel-pt-decoder/
libperf-$(CONFIG_AUXTRACE) += intel-pt.o
libperf-$(CONFIG_AUXTRACE) += intel-bts.o
libperf-$(CONFIG_AUXTRACE) += cs-etm.o
libperf-$(CONFIG_AUXTRACE) += cs-etm-decoder/
libperf-y += parse-branch-options.o
libperf-y += parse-regs-options.o

+2 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@

#include "intel-pt.h"
#include "intel-bts.h"
#include "cs-etm.h"

int auxtrace_mmap__mmap(struct auxtrace_mmap *mm,
			struct auxtrace_mmap_params *mp,
@@ -893,6 +894,7 @@ int perf_event__process_auxtrace_info(struct perf_tool *tool __maybe_unused,
	case PERF_AUXTRACE_INTEL_BTS:
		return intel_bts_process_auxtrace_info(event, session);
	case PERF_AUXTRACE_CS_ETM:
		return cs_etm__process_auxtrace_info(event, session);
	case PERF_AUXTRACE_UNKNOWN:
	default:
		return -EINVAL;
Loading