From patchwork Mon Sep 18 11:38:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 9956567 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 67EBF601E9 for ; Mon, 18 Sep 2017 11:38:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5840D28BE5 for ; Mon, 18 Sep 2017 11:38:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4D28D28C17; Mon, 18 Sep 2017 11:38:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E3E9328BE5 for ; Mon, 18 Sep 2017 11:38:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 71D2E6E344; Mon, 18 Sep 2017 11:38:58 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 514846E359 for ; Mon, 18 Sep 2017 11:38:49 +0000 (UTC) Received: by mail-wm0-x243.google.com with SMTP id i131so614202wma.1 for ; Mon, 18 Sep 2017 04:38:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ursulin-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=cuzbRMX+czt+AhydV8cxDOQD9x7Yr0oo/GdqKvEs9hE=; b=Ts0h85iCVbNjypAQIIhyq43h+gsgsVDlJlZ8qbqkg65Pa+pgnsBLnQx70mzogVog8Y YEqUiC0RQ0dz2WL4+46uxJbDi8agynPtERPQBXxEf0R1P6DlugcPnRDPDZWEkZ2A4DjO MrZ6jCd3xmg9kEcsQqw1L2wMYTNu9bKL+Ithcr2hbYBdslJW02NCVeQSGMzO6nIcQZF3 KBF+JabR6YifYmJOii8VshLuqiNg0TIxCvpcXJs3LkjqYdzHiSys2Jv/fzuYO5gpaFo/ Bh5XgnzAXShm5KusolXr2x27Jq5AoYFlIZ6yAlsnAuK71XiRSyyi4j9bDxehArDi43hO 2Xnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=cuzbRMX+czt+AhydV8cxDOQD9x7Yr0oo/GdqKvEs9hE=; b=BwrhuZejgv0lm1jD3iMnTJ8hqh8ZjxWBxnDw8rgX86JVlnXez9SnuakdcmQJJfk7PU 3ztcr/GWM52jrfCshYkFnBdja7VFr1OEbqCAWm2wofpSUTJwacuzusV8lgZtvTxcCXF6 UxRkAf+WvATi0excHRVZbu9lH7UtdKZTwNBgExA+KucI1qGdS4BwnzAHH/KBFAaTcu5E KRx2GzmwJ+hcbxLuwAE07hliHfIGJR86oMZTEyM/Umr7AzeNP5uowNN63ds8MV0LdRd5 YuD2ZMro9DCz8SnvZnP38ltkvUhDe43QDr5QFKtl1E2iaNZMEaMtqbX/dQO35LnVf3Sj ZHHw== X-Gm-Message-State: AHPjjUhzKl2LRHR6Z9NWYaaBhbpahLR8U/zhjNUhnYtk79wg91q+Bk1f P0UHEVtsFpev6GeJWIU= X-Google-Smtp-Source: AOwi7QBebkiSkzLhQRKtkriDgQ6rIG6yP890/zyASUSjcuK6fCn4IObuLNpEOE4ZVjGK/wfOepo90w== X-Received: by 10.28.19.11 with SMTP id 11mr3087390wmt.122.1505734727634; Mon, 18 Sep 2017 04:38:47 -0700 (PDT) Received: from t460p.intel ([95.146.151.158]) by smtp.gmail.com with ESMTPSA id n9sm8027075wmd.12.2017.09.18.04.38.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Sep 2017 04:38:47 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: Intel-gfx@lists.freedesktop.org Date: Mon, 18 Sep 2017 12:38:36 +0100 Message-Id: <20170918113840.2684-2-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20170918113840.2684-1-tvrtko.ursulin@linux.intel.com> References: <20170918113840.2684-1-tvrtko.ursulin@linux.intel.com> Subject: [Intel-gfx] [PATCH i-g-t 1/5] intel-gpu-overlay: Move local perf implementation to a library X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Tvrtko Ursulin Signed-off-by: Tvrtko Ursulin --- lib/Makefile.sources | 2 ++ overlay/perf.c => lib/igt_perf.c | 2 +- overlay/perf.h => lib/igt_perf.h | 2 ++ overlay/Makefile.am | 6 ++---- overlay/gem-interrupts.c | 3 ++- overlay/gpu-freq.c | 3 ++- overlay/gpu-perf.c | 3 ++- overlay/gpu-top.c | 3 ++- overlay/power.c | 3 ++- overlay/rc6.c | 3 ++- 10 files changed, 19 insertions(+), 11 deletions(-) rename overlay/perf.c => lib/igt_perf.c (94%) rename overlay/perf.h => lib/igt_perf.h (99%) diff --git a/lib/Makefile.sources b/lib/Makefile.sources index 53fdb54cbfa5..c031cb502469 100644 --- a/lib/Makefile.sources +++ b/lib/Makefile.sources @@ -16,6 +16,8 @@ lib_source_list = \ igt_gt.h \ igt_gvt.c \ igt_gvt.h \ + igt_perf.c \ + igt_perf.h \ igt_primes.c \ igt_primes.h \ igt_rand.c \ diff --git a/overlay/perf.c b/lib/igt_perf.c similarity index 94% rename from overlay/perf.c rename to lib/igt_perf.c index b8fdc675c587..45cccff0ae53 100644 --- a/overlay/perf.c +++ b/lib/igt_perf.c @@ -3,7 +3,7 @@ #include #include -#include "perf.h" +#include "igt_perf.h" uint64_t i915_type_id(void) { diff --git a/overlay/perf.h b/lib/igt_perf.h similarity index 99% rename from overlay/perf.h rename to lib/igt_perf.h index c44e65f9734c..a80b311cd1d1 100644 --- a/overlay/perf.h +++ b/lib/igt_perf.h @@ -1,6 +1,8 @@ #ifndef I915_PERF_H #define I915_PERF_H +#include + #include #define I915_SAMPLE_BUSY 0 diff --git a/overlay/Makefile.am b/overlay/Makefile.am index 5472514efc16..c66a80f4e571 100644 --- a/overlay/Makefile.am +++ b/overlay/Makefile.am @@ -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/libintel_tools.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 \ diff --git a/overlay/gem-interrupts.c b/overlay/gem-interrupts.c index 0150a1d03825..7ba54fcd487d 100644 --- a/overlay/gem-interrupts.c +++ b/overlay/gem-interrupts.c @@ -31,9 +31,10 @@ #include #include +#include "igt_perf.h" + #include "gem-interrupts.h" #include "debugfs.h" -#include "perf.h" static int perf_open(void) { diff --git a/overlay/gpu-freq.c b/overlay/gpu-freq.c index 321c93882238..7f29b1aa986e 100644 --- a/overlay/gpu-freq.c +++ b/overlay/gpu-freq.c @@ -28,9 +28,10 @@ #include #include +#include "igt_perf.h" + #include "gpu-freq.h" #include "debugfs.h" -#include "perf.h" static int perf_i915_open(int config, int group) { diff --git a/overlay/gpu-perf.c b/overlay/gpu-perf.c index f557b9f06a17..3d4a9be91a94 100644 --- a/overlay/gpu-perf.c +++ b/overlay/gpu-perf.c @@ -34,7 +34,8 @@ #include #include -#include "perf.h" +#include "igt_perf.h" + #include "gpu-perf.h" #include "debugfs.h" diff --git a/overlay/gpu-top.c b/overlay/gpu-top.c index 891a7ea7c0b1..06f489dfdc83 100644 --- a/overlay/gpu-top.c +++ b/overlay/gpu-top.c @@ -31,7 +31,8 @@ #include #include -#include "perf.h" +#include "igt_perf.h" + #include "igfx.h" #include "gpu-top.h" diff --git a/overlay/power.c b/overlay/power.c index 2f1521b82cd6..84d860cae40c 100644 --- a/overlay/power.c +++ b/overlay/power.c @@ -31,7 +31,8 @@ #include #include -#include "perf.h" +#include "igt_perf.h" + #include "power.h" #include "debugfs.h" diff --git a/overlay/rc6.c b/overlay/rc6.c index d7047c2f4880..3175bb22308f 100644 --- a/overlay/rc6.c +++ b/overlay/rc6.c @@ -31,8 +31,9 @@ #include #include +#include "igt_perf.h" + #include "rc6.h" -#include "perf.h" static int perf_i915_open(int config, int group) {