From patchwork Tue Mar 16 17:39:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yordan Karadzhov X-Patchwork-Id: 12143311 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1615C433E0 for ; Tue, 16 Mar 2021 17:40:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9217F6511D for ; Tue, 16 Mar 2021 17:40:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232207AbhCPRjx (ORCPT ); Tue, 16 Mar 2021 13:39:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231637AbhCPRjo (ORCPT ); Tue, 16 Mar 2021 13:39:44 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B797C06174A for ; Tue, 16 Mar 2021 10:39:42 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id f12so10892761wrx.8 for ; Tue, 16 Mar 2021 10:39:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=697wIE5VCZx9el31tE6oxlPqOMIdwAQRuWuo7kQSl54=; b=vb+zsiXhAnW6dZo0iEIzqDckWoY4hFhKI+GkVioMbpVYnHoFvY9VUYdWQOZdtU1O8q F+A1Ds3Cu40nuJtMFByAMxm3kxZFlsbQOU88XzwGk02y29Xn1cMRYP0uE2qPbiD0bNcK Ro5GARlvzeFnekYnxQPr7UewrV8YfY4CSgEjaN4Rg9TX+z5ZqeDzjJqRHzHPehyrmLzf CRw2D+zN+VjpGhkqOb3qF5OYUweeglSzGiUeuOWokoJB56ZVFxDwmizVfihj3bAexSe7 74g9+5MeWztPgN0SJ9mF4y73pt1tHA43Fnw2nCFYkjESA3QbIoD68HJPPdhwG6ZahOCQ QvHw== 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:mime-version :content-transfer-encoding; bh=697wIE5VCZx9el31tE6oxlPqOMIdwAQRuWuo7kQSl54=; b=VkTdyakNiOsGKNNDEUirYv9SmiMZGQkL2ac3BXjVYC4sg3k9rcCrlzvHzFngyj35tO Dvz5WgSKuhM4teiNOxeOx5NfmsaCRYNuNe4kn3tEGSNBYlZ0i9UZ9gqldcCOoapD/kWm Dwr4Igzm1ucVz+7Fsu6bs1wN4VHpF+brGZvTr9fKOIlBWrb8FbD/7C5BRyRC2XVwT3/I 8hwEg8RDbfRCeyjLkuuyALNXcg8BGMC1fQzznoCP6Y6hLJSnro1bklkGFLtZ5z5vuaYj tM+b8VPCA/B0QiGrs17rO8+PQlHlqmoH30yBlO0sksedmnNzsEcFAKP+C5R0W/5KXOhQ UPjQ== X-Gm-Message-State: AOAM530aChPEc+1Tv+nTfAh4NUJLsZjvCN1rsS7veO/1msqGSeGDPrNl 8QJTyHpGHLj9tn9s9IFHInhxD15c3Px84w== X-Google-Smtp-Source: ABdhPJx/OXspOOfvuNu+pYCi6+XDWVkWTB8BryP0G3vwLtU0s7IyL7jnpgO29yKY+Qq+gPY79bCRrw== X-Received: by 2002:adf:f8cd:: with SMTP id f13mr144480wrq.27.1615916381019; Tue, 16 Mar 2021 10:39:41 -0700 (PDT) Received: from localhost.localdomain ([95.87.199.162]) by smtp.gmail.com with ESMTPSA id a12sm21890191wrx.5.2021.03.16.10.39.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Mar 2021 10:39:40 -0700 (PDT) From: "Yordan Karadzhov (VMware)" To: linux-trace-devel@vger.kernel.org Cc: "Yordan Karadzhov (VMware)" Subject: [PATCH 1/3] kernel-shark: Build the plugins together with the GUI. Date: Tue, 16 Mar 2021 19:39:20 +0200 Message-Id: <20210316173922.657865-1-y.karadz@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org There is no need the compile the plugins in the case when not all third party dependencies are available and the KernelShark GUI is not compiled. In fact this even causes the build to fail because the plugins can include headers from the third party packages. Signed-off-by: Yordan Karadzhov (VMware) --- src/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1e86e9c..5942e91 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -140,9 +140,9 @@ if (Qt5Widgets_FOUND AND Qt5Network_FOUND AND TT_FONT_FILE) DESTINATION ${PKG_CONGIG_DIR} COMPONENT libkshark-devel) -endif (Qt5Widgets_FOUND AND Qt5Network_FOUND AND TT_FONT_FILE) + add_subdirectory(plugins) + set(PLUGINS ${PLUGINS} PARENT_SCOPE) -add_subdirectory(plugins) -set(PLUGINS ${PLUGINS} PARENT_SCOPE) + find_program(DO_AS_ROOT pkexec) -find_program(DO_AS_ROOT pkexec) +endif (Qt5Widgets_FOUND AND Qt5Network_FOUND AND TT_FONT_FILE) From patchwork Tue Mar 16 17:39:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yordan Karadzhov X-Patchwork-Id: 12143313 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1CE71C433E9 for ; Tue, 16 Mar 2021 17:40:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E0ED56512C for ; Tue, 16 Mar 2021 17:40:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231578AbhCPRjy (ORCPT ); Tue, 16 Mar 2021 13:39:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231851AbhCPRjo (ORCPT ); Tue, 16 Mar 2021 13:39:44 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F987C061756 for ; Tue, 16 Mar 2021 10:39:43 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id a18so10897029wrc.13 for ; Tue, 16 Mar 2021 10:39:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4H9q+iXjlXfW0gWSEa13+4A7UFWUDS1+n+dDaO1xfPg=; b=iqS+gDoLQDmWGYD7RFk2jelaKAYdlbrCo3oIK3ongnN1xlsFn1VIFuzctFnhfPtJKz RnzKwMiHt4KEx+60Tt7zs89DjSeCsc9Ds70TLsYGGNI682rj/g5kWgm0pIPkhshPUDX4 jkjorFghUZQpGb2KnmRqWetaRX27PB3UnDGls6jTMMQZGcbMeNDEJo5gP0P29kQfR50m fWYK8N34qAFitnbCjRhmRnnVYJZX8iHaNtWTziynhqMZd27sTh78k1cBNZh2X2PQhGHg JNS0LbqSsCV+87JOJ3mSLUjSfn9hQj2AN/dIQYTyqTGxYLHP04LyCo4HZBGitKomBqkJ dhug== 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:mime-version:content-transfer-encoding; bh=4H9q+iXjlXfW0gWSEa13+4A7UFWUDS1+n+dDaO1xfPg=; b=kMDfytpgSYggdQGa/YSgcwECs3jxy28y9jkNxKTiNXgqbVzicl/RqUJo6IBnLlt+1r 3QA8uZzitXZeQfqJKMvMoRz3kKr574kuYUnvzNlZjzqczY7gsZ77dPD2U2h7eAxbwMsC TQOysq2pQY2ueRj/BN++xdXi+6oiWWriFc7Gc/CeUPXuvILb3qHuJb/RXQvFQSFfLmAn puoViuxroyzJRR36/Om/lNkGyHVNJZ/k9jwBC0JhQiBTGucggbsoxySVKmT0iWv01s5g 1lBdlDIDPWdErHrRY9PfQirqJqBiiZfMuFRefCeoQDdo2v7zYsobcIuIUB8GA5qup7XY xjQQ== X-Gm-Message-State: AOAM531UmLUYjsO/T26FenALfxooKYCM5gWVVEvn8P65w+6FQfdC906J 3FRG+M/5kLSqZlU0W3tX420CtPYnCoP7hA== X-Google-Smtp-Source: ABdhPJxufrYvUUV05FvKJJJAbAVfHo74M5auXAwlF5k5YIz7sAyZpsN5/2hqeJBm5/S73eJ42CQaxw== X-Received: by 2002:adf:f186:: with SMTP id h6mr171692wro.290.1615916381790; Tue, 16 Mar 2021 10:39:41 -0700 (PDT) Received: from localhost.localdomain ([95.87.199.162]) by smtp.gmail.com with ESMTPSA id a12sm21890191wrx.5.2021.03.16.10.39.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Mar 2021 10:39:41 -0700 (PDT) From: "Yordan Karadzhov (VMware)" To: linux-trace-devel@vger.kernel.org Cc: "Yordan Karadzhov (VMware)" Subject: [PATCH 2/3] kernel-shark: Build "dataplot" only if OpenGL and GLUT are found Date: Tue, 16 Mar 2021 19:39:21 +0200 Message-Id: <20210316173922.657865-2-y.karadz@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210316173922.657865-1-y.karadz@gmail.com> References: <20210316173922.657865-1-y.karadz@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org The "dataplot" example depends from those two packages. Signed-off-by: Yordan Karadzhov (VMware) --- examples/CMakeLists.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index bc17635..c2f4c01 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -20,9 +20,13 @@ message(STATUS "confogio") add_executable(confio configio.c) target_link_libraries(confio kshark) -message(STATUS "dataplot") -add_executable(dplot dataplot.cpp) -target_link_libraries(dplot kshark-plot) +if (OPENGL_FOUND AND GLUT_FOUND) + + message(STATUS "dataplot") + add_executable(dplot dataplot.cpp) + target_link_libraries(dplot kshark-plot) + +endif (OPENGL_FOUND AND GLUT_FOUND) if (Qt5Widgets_FOUND AND TT_FONT_FILE) From patchwork Tue Mar 16 17:39:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yordan Karadzhov X-Patchwork-Id: 12143315 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 048A7C433E6 for ; Tue, 16 Mar 2021 17:40:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C967C6512B for ; Tue, 16 Mar 2021 17:40:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231637AbhCPRjz (ORCPT ); Tue, 16 Mar 2021 13:39:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231907AbhCPRjo (ORCPT ); Tue, 16 Mar 2021 13:39:44 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECE36C06175F for ; Tue, 16 Mar 2021 10:39:43 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id e18so7873511wrt.6 for ; Tue, 16 Mar 2021 10:39:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2l0/q3oj+CBGXucKw7yMd7n960z+gsAxzyVuupixl6w=; b=NR+nj2ZiF2UeQws7s5pprQDvPrK2u7vx/xMkDOfJuG0PS/fJpR7r7N97zy2MbS/YWJ Aa8Y7W46T2SFxi8x9E2r+w/l4DKGEr6WBumXknYLuxUXRYgH59qTDxPCoLR4jL/XFaTx pDej5KriUK0saZui05jfLE1fms1KUJUZTNWBUAdr7+SucSsXcH3wr0rYpcY683mk3zAa ISTW291j5gxn/LZxSYSOFfIs423y/+X7UzRvXlRuWFwP2cTe8UHZroyANo/QlTKdHEP6 ENwtuGh2RBBdXSvnHSYeie5DXulpOxWYKDINCGFcNBXx0eXho78ZxLVVpNqUeakLgPp2 kGxw== 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:mime-version:content-transfer-encoding; bh=2l0/q3oj+CBGXucKw7yMd7n960z+gsAxzyVuupixl6w=; b=hEwhUUMFIaFXXVv7hwxK3QLLpD5u+j75JMatNr/APjjuSH5r1hRDGW5KKLXL0ZtTp1 KWV1T4x2A9ESLcQmBovX/C8KayM6u5aXBMzd8TeefOkzAtkRuSbNRFnigI8RGMQCcDqo yH6nOOCGmvpJZP5s0g3OEIBs+panVHgMOZtbZ/dSiGvZZl/821m7HS72voyd5HJkgaDf TRaRwnBXX69mk63rKyelWOJURQmeEkaKPZcc8k1k2JOs15Q3jT53r/1viYU+qeD99tcc s55vfDSrexTFnNk7ZdOlTpPa03Ix/XrDXwcfOhd0rsf/O9B5GMxRit0Y4o4wBYnbuJqc mmNQ== X-Gm-Message-State: AOAM530lit3MPJ5mkOGP5nzE3eG87T/55sZGfdywwff4ddxdrU/ynmdX xx0MQQOEvfCCfu2NnZjoCaPyYiNtCUM/0Q== X-Google-Smtp-Source: ABdhPJw2j+h9H5xb2mZPWQBcE29Mx7S64SGJ85OgKpJBlcr2Sj8kjFhwQMFR6HUch+eKqnm5vc7tZg== X-Received: by 2002:adf:f005:: with SMTP id j5mr101055wro.423.1615916382494; Tue, 16 Mar 2021 10:39:42 -0700 (PDT) Received: from localhost.localdomain ([95.87.199.162]) by smtp.gmail.com with ESMTPSA id a12sm21890191wrx.5.2021.03.16.10.39.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Mar 2021 10:39:42 -0700 (PDT) From: "Yordan Karadzhov (VMware)" To: linux-trace-devel@vger.kernel.org Cc: "Yordan Karadzhov (VMware)" Subject: [PATCH 3/3] kernel-shark: Always install the pkg-config descriptor Date: Tue, 16 Mar 2021 19:39:22 +0200 Message-Id: <20210316173922.657865-3-y.karadz@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210316173922.657865-1-y.karadz@gmail.com> References: <20210316173922.657865-1-y.karadz@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org The pkg-config support is part of libkshark and has to be installed together with the other components of the library regardless of the GUI compilation. Signed-off-by: Yordan Karadzhov (VMware) --- src/CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5942e91..ec4149a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -38,6 +38,12 @@ install(FILES "${KS_DIR}/src/libkshark.h" DESTINATION ${KS_INCLUDS_DESTINATION} COMPONENT libkshark-devel) +execute_process(COMMAND bash "-c" "pkg-config --variable pc_path pkg-config | cut -f 1 -d: -z" + OUTPUT_VARIABLE PKG_CONGIG_DIR) +install(FILES "${KS_DIR}/libkshark.pc" + DESTINATION ${PKG_CONGIG_DIR} + COMPONENT libkshark-devel) + if (OPENGL_FOUND) message(STATUS "libkshark-plot") @@ -134,12 +140,6 @@ if (Qt5Widgets_FOUND AND Qt5Network_FOUND AND TT_FONT_FILE) DESTINATION ${_INSTALL_PREFIX}/bin/ COMPONENT kernelshark) - execute_process(COMMAND bash "-c" "pkg-config --variable pc_path pkg-config | cut -f 1 -d: -z" - OUTPUT_VARIABLE PKG_CONGIG_DIR) - install(FILES "${KS_DIR}/libkshark.pc" - DESTINATION ${PKG_CONGIG_DIR} - COMPONENT libkshark-devel) - add_subdirectory(plugins) set(PLUGINS ${PLUGINS} PARENT_SCOPE)