Skip to content
Snippets Groups Projects
Commit a688dece authored by Tvrtko Ursulin's avatar Tvrtko Ursulin
Browse files

intel-gpu-overlay: Move local perf implementation to a library


Idea is to avoid duplication across multiple users in
upcoming patches.

v2: Commit message and use a separate library instead of piggy-
    backing to libintel_tools. (Chris Wilson)

v3: Add Petri's meson build recipe.

Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
parent 42ee3f94
No related merge requests found
......@@ -7,7 +7,11 @@ include Makefile.sources
libintel_tools_la_SOURCES = $(lib_source_list)
noinst_LTLIBRARIES = libintel_tools.la
libigt_perf_la_SOURCES = \
igt_perf.c \
igt_perf.h
noinst_LTLIBRARIES = libintel_tools.la libigt_perf.la
noinst_HEADERS = check-ndebug.h
if BUILD_VC4
......
......@@ -3,7 +3,7 @@
#include <unistd.h>
#include <stdlib.h>
#include "perf.h"
#include "igt_perf.h"
uint64_t i915_type_id(void)
{
......
#ifndef I915_PERF_H
#define I915_PERF_H
#include <stdint.h>
#include <linux/perf_event.h>
#define I915_SAMPLE_BUSY 0
......
......@@ -179,4 +179,8 @@ lib_igt = declare_dependency(link_with : lib_igt_build,
igt_deps = [ lib_igt ] + lib_deps
lib_igt_perf = static_library('igt_perf',
['igt_perf.c']
)
subdir('tests')
......@@ -4,8 +4,8 @@ endif
AM_CPPFLAGS = -I.
AM_CFLAGS = $(DRM_CFLAGS) $(PCIACCESS_CFLAGS) $(CWARNFLAGS) \
$(CAIRO_CFLAGS) $(OVERLAY_CFLAGS) $(WERROR_CFLAGS)
LDADD = $(DRM_LIBS) $(PCIACCESS_LIBS) $(CAIRO_LIBS) $(OVERLAY_LIBS)
$(CAIRO_CFLAGS) $(OVERLAY_CFLAGS) $(WERROR_CFLAGS) -I$(srcdir)/../lib
LDADD = $(DRM_LIBS) $(PCIACCESS_LIBS) $(CAIRO_LIBS) $(OVERLAY_LIBS) $(top_builddir)/lib/libigt_perf.la
intel_gpu_overlay_SOURCES = \
chart.h \
......@@ -29,8 +29,6 @@ intel_gpu_overlay_SOURCES = \
igfx.c \
overlay.h \
overlay.c \
perf.h \
perf.c \
power.h \
power.c \
rc6.h \
......
......@@ -31,9 +31,10 @@
#include <string.h>
#include <ctype.h>
#include "igt_perf.h"
#include "gem-interrupts.h"
#include "debugfs.h"
#include "perf.h"
static int perf_open(void)
{
......
......@@ -28,9 +28,10 @@
#include <string.h>
#include <stdio.h>
#include "igt_perf.h"
#include "gpu-freq.h"
#include "debugfs.h"
#include "perf.h"
static int perf_i915_open(int config, int group)
{
......
......@@ -34,7 +34,8 @@
#include <fcntl.h>
#include <errno.h>
#include "perf.h"
#include "igt_perf.h"
#include "gpu-perf.h"
#include "debugfs.h"
......
......@@ -31,7 +31,8 @@
#include <errno.h>
#include <assert.h>
#include "perf.h"
#include "igt_perf.h"
#include "igfx.h"
#include "gpu-top.h"
......
......@@ -10,7 +10,6 @@ gpu_overlay_src = [
'gpu-freq.c',
'igfx.c',
'overlay.c',
'perf.c',
'power.c',
'rc6.c',
]
......@@ -56,5 +55,6 @@ if xrandr.found() and cairo.found()
include_directories : inc,
c_args : gpu_overlay_cflags,
dependencies : gpu_overlay_deps,
link_with : lib_igt_perf,
install : true)
endif
......@@ -31,7 +31,8 @@
#include <time.h>
#include <errno.h>
#include "perf.h"
#include "igt_perf.h"
#include "power.h"
#include "debugfs.h"
......
......@@ -31,8 +31,9 @@
#include <time.h>
#include <errno.h>
#include "igt_perf.h"
#include "rc6.h"
#include "perf.h"
static int perf_i915_open(int config, int group)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment