From patchwork Thu May 23 15:18:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yordan Karadzhov X-Patchwork-Id: 10958021 X-Patchwork-Delegate: rostedt@goodmis.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 59D8B924 for ; Thu, 23 May 2019 15:18:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 43742285C8 for ; Thu, 23 May 2019 15:18:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 37B9828671; Thu, 23 May 2019 15:18:46 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 95F8C28613 for ; Thu, 23 May 2019 15:18:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731171AbfEWPSp (ORCPT ); Thu, 23 May 2019 11:18:45 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:41642 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730741AbfEWPSp (ORCPT ); Thu, 23 May 2019 11:18:45 -0400 Received: by mail-wr1-f66.google.com with SMTP id u16so2841599wrn.8 for ; Thu, 23 May 2019 08:18:43 -0700 (PDT) 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=RfT3uVJbbDvYX1cpJG/6qN0yVgOZWH62ygKrJSonUTQ=; b=bMR7hgdJrHi+f0mF+bVSR0pUvQg/dyBMZg/3ITM0ietczzL133pG69rADy0OFN++Kl 74afpRX8O5zXRxsWPuVQ7ZN3lSx15m/HwbKCD9r+hysyGX46Ur6ChGqi08XmrZSfA+Ih 3AsvQOPRD8Eujqs1MjLZMLuImoenmp/3JoTTvwFUE2+pHRWEAH74jNsMPZHW5n02TlS/ 7+0eAErp5Bftt3ykwBnpMQMMh3fWVa1zpnUogDwrsn61jMGUyvA+7Ny+7sHIvMlfbKVe Q1xzfRO+o4VidD+Nsm3lvq3corf6Q4uEHw3O82/fpfP0pQlMZKXJgZHjlO7+ZOyWZdfO ToLA== X-Gm-Message-State: APjAAAUm5ZkPuyqyimOOyDkNgOA6aRhnOJhOAe0AZySndS8Wb9DOTtDe nbu6VWY35t0++E8hy5xwlWTv6yX6 X-Google-Smtp-Source: APXvYqzXnjMJp/2bVEU4XKQ9MSC2UGwQMX+fNuZfZtdS96UMj6Cu9CjBBQBHkU9CLAdtiOZ+G+50rA== X-Received: by 2002:a5d:45c7:: with SMTP id b7mr37493449wrs.176.1558624722493; Thu, 23 May 2019 08:18:42 -0700 (PDT) Received: from mamba.eng.vmware.com ([146.247.46.5]) by smtp.gmail.com with ESMTPSA id x9sm12687071wmf.27.2019.05.23.08.18.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 May 2019 08:18:42 -0700 (PDT) From: Yordan Karadzhov To: rostedt@goodmis.org Cc: linux-trace-devel@vger.kernel.org, y.karadz@gmail.com, Yordan Karadzhov Subject: [PATCH 1/5] kernel-shark: Add new dataloading method to be used by the NumPu interface Date: Thu, 23 May 2019 18:18:08 +0300 Message-Id: <20190523151812.31391-2-ykaradzhov@vmware.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190523151812.31391-1-ykaradzhov@vmware.com> References: <20190523151812.31391-1-ykaradzhov@vmware.com> MIME-Version: 1.0 Sender: linux-trace-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The new function loads the content of the trace data file into a table / matrix, made of columns / arrays of data having various integer types. Later those arrays will be wrapped as NumPy arrays. Signed-off-by: Yordan Karadzhov --- kernel-shark/src/libkshark.c | 155 +++++++++++++++++++++++++++++++++++ kernel-shark/src/libkshark.h | 7 ++ 2 files changed, 162 insertions(+) diff --git a/kernel-shark/src/libkshark.c b/kernel-shark/src/libkshark.c index 175279c..ac634fd 100644 --- a/kernel-shark/src/libkshark.c +++ b/kernel-shark/src/libkshark.c @@ -957,6 +957,161 @@ ssize_t kshark_load_data_records(struct kshark_context *kshark_ctx, return -ENOMEM; } +static bool data_matrix_alloc(size_t n_rows, uint64_t **offset_array, + uint8_t **cpu_array, + uint64_t **ts_array, + uint16_t **pid_array, + int **event_array) +{ + if (offset_array) + *offset_array = NULL; + + if (cpu_array) + *cpu_array = NULL; + + if (ts_array) + *ts_array = NULL; + + if (pid_array) + *pid_array = NULL; + + if (event_array) + *event_array = NULL; + + if (offset_array) { + *offset_array = calloc(n_rows, sizeof(**offset_array)); + if (!*offset_array) + goto free_all; + } + + if (cpu_array) { + *cpu_array = calloc(n_rows, sizeof(**cpu_array)); + if (!*cpu_array) + goto free_all; + } + + if (ts_array) { + *ts_array = calloc(n_rows, sizeof(**ts_array)); + if (!*ts_array) + goto free_all; + } + + if (pid_array) { + *pid_array = calloc(n_rows, sizeof(**pid_array)); + if (!*pid_array) + goto free_all; + } + + if (event_array) { + *event_array = calloc(n_rows, sizeof(**event_array)); + if (!*event_array) + goto free_all; + } + + return true; + + free_all: + fprintf(stderr, "Failed to allocate memory during data loading.\n"); + + if (offset_array) + free(*offset_array); + + if (cpu_array) + free(*cpu_array); + + if (ts_array) + free(*ts_array); + + if (pid_array) + free(*pid_array); + + if (event_array) + free(*event_array); + + return false; +} + +/** + * @brief Load the content of the trace data file into a table / matrix made + * of columns / arrays of data. The user is responsible for freeing the + * elements of the outputted array + * + * @param kshark_ctx: Input location for the session context pointer. + * @param offset_array: Output location for the array of record offsets. + * @param cpu_array: Output location for the array of CPU Ids. + * @param ts_array: Output location for the array of timestamps. + * @param pid_array: Output location for the array of Process Ids. + * @param event_array: Output location for the array of Event Ids. + * + * @returns The size of the outputted arrays in the case of success, or a + * negative error code on failure. + */ +size_t kshark_load_data_matrix(struct kshark_context *kshark_ctx, + uint64_t **offset_array, + uint8_t **cpu_array, + uint64_t **ts_array, + uint16_t **pid_array, + int **event_array) +{ + enum rec_type type = REC_ENTRY; + struct rec_list **rec_list; + size_t count, total = 0; + bool status; + int n_cpus; + + total = get_records(kshark_ctx, &rec_list, type); + if (total < 0) + goto fail; + + n_cpus = tracecmd_cpus(kshark_ctx->handle); + + status = data_matrix_alloc(total, offset_array, + cpu_array, + ts_array, + pid_array, + event_array); + if (!status) + goto fail_free; + + for (count = 0; count < total; count++) { + int next_cpu; + + next_cpu = pick_next_cpu(rec_list, n_cpus, type); + if (next_cpu >= 0) { + struct kshark_entry *e = &rec_list[next_cpu]->entry; + + if (offset_array) + (*offset_array)[count] = e->offset; + + if (cpu_array) + (*cpu_array)[count] = e->cpu; + + if (ts_array) + (*ts_array)[count] = e->ts; + + if (pid_array) + (*pid_array)[count] = e->pid; + + if (event_array) + (*event_array)[count] = e->event_id; + + rec_list[next_cpu] = rec_list[next_cpu]->next; + free(e); + } + } + + /* There should be no entries left in rec_list. */ + free_rec_list(rec_list, n_cpus, type); + return total; + + fail_free: + free_rec_list(rec_list, n_cpus, type); + + fail: + fprintf(stderr, "Failed to allocate memory during data loading.\n"); + return -ENOMEM; +} + static const char *kshark_get_latency(struct tep_handle *pe, struct tep_record *record) { diff --git a/kernel-shark/src/libkshark.h b/kernel-shark/src/libkshark.h index c218b61..92ade41 100644 --- a/kernel-shark/src/libkshark.h +++ b/kernel-shark/src/libkshark.h @@ -149,6 +149,13 @@ ssize_t kshark_load_data_entries(struct kshark_context *kshark_ctx, ssize_t kshark_load_data_records(struct kshark_context *kshark_ctx, struct tep_record ***data_rows); +size_t kshark_load_data_matrix(struct kshark_context *kshark_ctx, + uint64_t **offset_array, + uint8_t **cpu_array, + uint64_t **ts_array, + uint16_t **pid_array, + int **event_array); + ssize_t kshark_get_task_pids(struct kshark_context *kshark_ctx, int **pids); void kshark_close(struct kshark_context *kshark_ctx); From patchwork Thu May 23 15:18:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yordan Karadzhov X-Patchwork-Id: 10958023 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8D385924 for ; Thu, 23 May 2019 15:18:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 78864285D4 for ; Thu, 23 May 2019 15:18:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6CD0128683; Thu, 23 May 2019 15:18:47 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9ECF928613 for ; Thu, 23 May 2019 15:18:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731174AbfEWPSq (ORCPT ); Thu, 23 May 2019 11:18:46 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:39446 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731168AbfEWPSq (ORCPT ); Thu, 23 May 2019 11:18:46 -0400 Received: by mail-wr1-f68.google.com with SMTP id w8so6729308wrl.6 for ; Thu, 23 May 2019 08:18:44 -0700 (PDT) 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=FamIbrokL55QW90yqmuFSSjrrjfKdFoq1h0zI09ftcc=; b=aHshxV/TEm4yirJWVacraHlyINgKLaWPPZ5YHQe/JBnf1lNqKv4/6kzQv409UHvrri +B2jkLaOHWzrqc5N/1q0GuOUbytho3sXD+n8yaTizu4rl5kbqK7iftUgtYC634sSQgFO mmpGx4oq5Tqzg/UPKQvgqQy5+Eo+TyKqq65JejgOKPnpzLFr4WFLHN9IMZFDss+MhZpp qkWmoiEL5xJHAaOc/VnMlR2auAzdx5a9BOqfiUJTW6BFDk59iLmSaqJlSbRa7xO5kboe zXA2e3d92kznWBagv0K1xQrFdfP39FTZRjBth7+ZUGtZhhdK8uBHectmAiKTRXosFiIv b3cQ== X-Gm-Message-State: APjAAAVRnISAM+rbHpvv85wW/M2b9WVYpA+c/iqjldlnlDu7hQ5ejtOK nDh2U2R+gZa3zWelsEA57L8= X-Google-Smtp-Source: APXvYqzf/cFFGdJEnw3uUMz7wgawOWkhIwr8rIdGG27eApC+SjRC/pm1DdcS5o19CnCNXA1M+RbOWw== X-Received: by 2002:a05:6000:47:: with SMTP id k7mr3084675wrx.305.1558624723911; Thu, 23 May 2019 08:18:43 -0700 (PDT) Received: from mamba.eng.vmware.com ([146.247.46.5]) by smtp.gmail.com with ESMTPSA id x9sm12687071wmf.27.2019.05.23.08.18.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 May 2019 08:18:43 -0700 (PDT) From: Yordan Karadzhov To: rostedt@goodmis.org Cc: linux-trace-devel@vger.kernel.org, y.karadz@gmail.com, Yordan Karadzhov Subject: [PATCH 2/5] kernel-shark: Use full paths for non-standard library headers Date: Thu, 23 May 2019 18:18:09 +0300 Message-Id: <20190523151812.31391-3-ykaradzhov@vmware.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190523151812.31391-1-ykaradzhov@vmware.com> References: <20190523151812.31391-1-ykaradzhov@vmware.com> MIME-Version: 1.0 Sender: linux-trace-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The all header files included in the public interfaces of the trace-cmd and KernelShark libraries have to use full path when including other non-standard library headers. This will be useful if someone wants to use those public interfaces from there installation location. You may need to clean Cmake's cache after aplaying this patch: cd kernel-shark/build ./cmake_clean.sh cmake .. Signed-off-by: Yordan Karadzhov --- include/trace-cmd/trace-cmd.h | 2 +- include/traceevent/event-parse.h | 2 +- kernel-shark/CMakeLists.txt | 3 +- kernel-shark/build/FindTraceCmd.cmake | 40 ++++++++++++--------------- kernel-shark/src/libkshark-plugin.h | 2 +- kernel-shark/src/libkshark.h | 9 +++--- 6 files changed, 26 insertions(+), 32 deletions(-) diff --git a/include/trace-cmd/trace-cmd.h b/include/trace-cmd/trace-cmd.h index ceb03f4..9320098 100644 --- a/include/trace-cmd/trace-cmd.h +++ b/include/trace-cmd/trace-cmd.h @@ -6,7 +6,7 @@ #ifndef _TRACE_CMD_H #define _TRACE_CMD_H -#include "event-parse.h" +#include "traceevent/event-parse.h" #define ARRAY_SIZE(_a) (sizeof(_a) / sizeof((_a)[0])) #define __weak __attribute__((weak)) diff --git a/include/traceevent/event-parse.h b/include/traceevent/event-parse.h index 5e0fd19..65cabd9 100644 --- a/include/traceevent/event-parse.h +++ b/include/traceevent/event-parse.h @@ -12,7 +12,7 @@ #include #include -#include "trace-seq.h" +#include "traceevent/trace-seq.h" #ifndef __maybe_unused #define __maybe_unused __attribute__((unused)) diff --git a/kernel-shark/CMakeLists.txt b/kernel-shark/CMakeLists.txt index 52e4a29..145b058 100644 --- a/kernel-shark/CMakeLists.txt +++ b/kernel-shark/CMakeLists.txt @@ -56,8 +56,7 @@ SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) include_directories(${KS_DIR}/src/ ${KS_DIR}/build/src/ ${JSONC_INCLUDE_DIR} - ${TRACECMD_INCLUDE_DIR} - ${TRACEEVENT_INCLUDE_DIR}) + ${TRACECMD_INCLUDE_DIR}) message("") message(STATUS "C flags : " ${CMAKE_C_FLAGS}) diff --git a/kernel-shark/build/FindTraceCmd.cmake b/kernel-shark/build/FindTraceCmd.cmake index b09a11b..21315e7 100644 --- a/kernel-shark/build/FindTraceCmd.cmake +++ b/kernel-shark/build/FindTraceCmd.cmake @@ -2,7 +2,6 @@ # This module finds an installed trace-cmd package. # # It sets the following variables: -# TRACEEVENT_INCLUDE_DIR, where to find traceevent header. # TRACEEVENT_LIBRARY_DIR , where to find the traceevent library. # TRACEEVENT_LIBRARY, traceevent the library. # TRACEEVENT_FOUND, If false, do not try to use traceevent. @@ -20,26 +19,32 @@ find_path(TRACECMD_BIN_DIR NAMES trace-cmd ${CMAKE_SOURCE_DIR}/../tracecmd/ NO_DEFAULT_PATH) -find_path(TRACECMD_INCLUDE_DIR NAMES trace-cmd.h - PATHS $ENV{TRACE_CMD}/include/trace-cmd/ - ${CMAKE_SOURCE_DIR}/../include/trace-cmd/ +find_path(TRACECMD_INCLUDE_DIR NAMES trace-cmd/trace-cmd.h + PATHS $ENV{TRACE_CMD}/include/ + ${CMAKE_SOURCE_DIR}/../include/ NO_DEFAULT_PATH) -find_path(TRACECMD_LIBRARY_DIR NAMES libtracecmd.a - PATHS $ENV{TRACE_CMD}/lib/trace-cmd/ - ${CMAKE_SOURCE_DIR}/../lib/trace-cmd/ +find_path(TRACECMD_LIBRARY_DIR NAMES trace-cmd/libtracecmd.a + PATHS $ENV{TRACE_CMD}/lib/ + ${CMAKE_SOURCE_DIR}/../lib/ NO_DEFAULT_PATH) +find_path(TRACEEVENT_LIBRARY_DIR NAMES traceevent/libtraceevent.a + PATHS $ENV{TRACE_CMD}/lib/ + ${CMAKE_SOURCE_DIR}/../lib/ + NO_DEFAULT_PATH) + # If not found, search in the default system paths. Note that if the previous # search was successful "find_path" will do nothing this time. find_path(TRACECMD_BIN_DIR NAMES trace-cmd) -find_path(TRACECMD_INCLUDE_DIR NAMES trace-cmd.h) -find_path(TRACECMD_LIBRARY_DIR NAMES libtracecmd.a) +find_path(TRACECMD_INCLUDE_DIR NAMES trace-cmd/trace-cmd.h) +find_library(TRACECMD_LIBRARY_DIR NAMES trace-cmd/libtracecmd.a) +find_library(TRACEEVENT_LIBRARY_DIR NAMES traceevent/libtraceevent.a) IF (TRACECMD_INCLUDE_DIR AND TRACECMD_LIBRARY_DIR) SET(TRACECMD_FOUND TRUE) - SET(TRACECMD_LIBRARY "${TRACECMD_LIBRARY_DIR}/libtracecmd.a") + SET(TRACECMD_LIBRARY "${TRACECMD_LIBRARY_DIR}/trace-cmd/libtracecmd.a") ENDIF (TRACECMD_INCLUDE_DIR AND TRACECMD_LIBRARY_DIR) @@ -53,21 +58,12 @@ ELSE (TRACECMD_FOUND) ENDIF (TRACECMD_FOUND) - -find_path(TRACEEVENT_INCLUDE_DIR NAMES event-parse.h - PATHS $ENV{TRACE_CMD}/include/traceevent/ - ${CMAKE_SOURCE_DIR}/../include/traceevent/) - -find_path(TRACEEVENT_LIBRARY_DIR NAMES libtraceevent.a - PATHS $ENV{TRACE_CMD}/lib/traceevent/ - ${CMAKE_SOURCE_DIR}/../lib/traceevent/) - -IF (TRACEEVENT_INCLUDE_DIR AND TRACEEVENT_LIBRARY_DIR) +IF (TRACEEVENT_LIBRARY_DIR) SET(TRACEEVENT_FOUND TRUE) - SET(TRACEEVENT_LIBRARY "${TRACEEVENT_LIBRARY_DIR}/libtraceevent.a") + SET(TRACEEVENT_LIBRARY "${TRACEEVENT_LIBRARY_DIR}/traceevent/libtraceevent.a") -ENDIF (TRACEEVENT_INCLUDE_DIR AND TRACEEVENT_LIBRARY_DIR) +ENDIF (TRACEEVENT_LIBRARY_DIR) IF (TRACEEVENT_FOUND) diff --git a/kernel-shark/src/libkshark-plugin.h b/kernel-shark/src/libkshark-plugin.h index 0cb677a..b3cf1c6 100644 --- a/kernel-shark/src/libkshark-plugin.h +++ b/kernel-shark/src/libkshark-plugin.h @@ -17,7 +17,7 @@ extern "C" { #endif // __cplusplus // trace-cmd -#include "event-parse.h" +#include "traceevent/event-parse.h" /* Quiet warnings over documenting simple structures */ //! @cond Doxygen_Suppress diff --git a/kernel-shark/src/libkshark.h b/kernel-shark/src/libkshark.h index 92ade41..e4349c3 100644 --- a/kernel-shark/src/libkshark.h +++ b/kernel-shark/src/libkshark.h @@ -18,17 +18,16 @@ #include // Json-C -#include +#include #ifdef __cplusplus extern "C" { #endif // trace-cmd -#include "trace-cmd.h" -#include "trace-filter-hash.h" -#include "event-parse.h" -#include "trace-filter-hash.h" +#include "trace-cmd/trace-cmd.h" +#include "trace-cmd/trace-filter-hash.h" +#include "traceevent/event-parse.h" // KernelShark #include "libkshark-plugin.h" From patchwork Thu May 23 15:18:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yordan Karadzhov X-Patchwork-Id: 10958029 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6668976 for ; Thu, 23 May 2019 15:18:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 51A7E2867C for ; Thu, 23 May 2019 15:18:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4616328681; Thu, 23 May 2019 15:18:51 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D81222867C for ; Thu, 23 May 2019 15:18:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731185AbfEWPSr (ORCPT ); Thu, 23 May 2019 11:18:47 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:44450 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730741AbfEWPSq (ORCPT ); Thu, 23 May 2019 11:18:46 -0400 Received: by mail-wr1-f68.google.com with SMTP id w13so6697617wru.11 for ; Thu, 23 May 2019 08:18:45 -0700 (PDT) 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=WjmaV1lSkCYDOvb3GEAecwv2rT46hwvlIAOUE8+KUcA=; b=IPtZhvXdtMYpSKTohOvNc83wmLs0h9Ib4UZLEItR3+A8pD3Z/aqoxW5o3iQHqQUtFG +6yw1IQxsj1pz/E9hzVhlZLXv4PEXwileO0JzwVq+v3IvSq2BmHOu3ZkAbk8QD66KdFy WXIhGHmNrnb+dGM08n5M5eEblxyM+Hnn5BGWW2usmJ32KbWdfq1gQ17r4DpuXr8wg3wE 3NS/jZQiUjHYQ0eXi6xwFhWsiPjHfYxcxBBXhp7qCG5+CLvFighR1Ip+oldC7EAjlnmn AQYoFIOikLnuaYSLvTG7RdkIL9xW+/NVW+60IGQblK9/vc+6mh5cyqswKNQHxNmQoZco ZK5A== X-Gm-Message-State: APjAAAXYPBBpAuj3KT1trhj3V6TKik2FMbLf7jRLcRrIBiOY6QPycB/q mGKvrHPUSBGwU557C9qLNxg= X-Google-Smtp-Source: APXvYqxVjmDhScNxGbIjm/yVO6pgegX5Hl5lY45AI2Bn3fPWaXVArUsyng7uVnCRMsUX+PeVT4dQlA== X-Received: by 2002:a5d:4b81:: with SMTP id b1mr34396913wrt.217.1558624725412; Thu, 23 May 2019 08:18:45 -0700 (PDT) Received: from mamba.eng.vmware.com ([146.247.46.5]) by smtp.gmail.com with ESMTPSA id x9sm12687071wmf.27.2019.05.23.08.18.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 May 2019 08:18:45 -0700 (PDT) From: Yordan Karadzhov To: rostedt@goodmis.org Cc: linux-trace-devel@vger.kernel.org, y.karadz@gmail.com, Yordan Karadzhov Subject: [PATCH 3/5] kernel-shark: Use the shared versions of the trace-cmd libraries. Date: Thu, 23 May 2019 18:18:10 +0300 Message-Id: <20190523151812.31391-4-ykaradzhov@vmware.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190523151812.31391-1-ykaradzhov@vmware.com> References: <20190523151812.31391-1-ykaradzhov@vmware.com> MIME-Version: 1.0 Sender: linux-trace-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP You may need to clean Cmake's cache after aplaying this patch: cd kernel-shark/build ./cmake_clean.sh cmake .. Signed-off-by: Yordan Karadzhov --- kernel-shark/build/FindTraceCmd.cmake | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kernel-shark/build/FindTraceCmd.cmake b/kernel-shark/build/FindTraceCmd.cmake index 21315e7..7ebf8da 100644 --- a/kernel-shark/build/FindTraceCmd.cmake +++ b/kernel-shark/build/FindTraceCmd.cmake @@ -24,12 +24,12 @@ find_path(TRACECMD_INCLUDE_DIR NAMES trace-cmd/trace-cmd.h ${CMAKE_SOURCE_DIR}/../include/ NO_DEFAULT_PATH) -find_path(TRACECMD_LIBRARY_DIR NAMES trace-cmd/libtracecmd.a +find_path(TRACECMD_LIBRARY_DIR NAMES trace-cmd/libtracecmd.so PATHS $ENV{TRACE_CMD}/lib/ ${CMAKE_SOURCE_DIR}/../lib/ NO_DEFAULT_PATH) -find_path(TRACEEVENT_LIBRARY_DIR NAMES traceevent/libtraceevent.a +find_path(TRACEEVENT_LIBRARY_DIR NAMES traceevent/libtraceevent.so PATHS $ENV{TRACE_CMD}/lib/ ${CMAKE_SOURCE_DIR}/../lib/ NO_DEFAULT_PATH) @@ -38,13 +38,13 @@ find_path(TRACEEVENT_LIBRARY_DIR NAMES traceevent/libtraceevent.a # search was successful "find_path" will do nothing this time. find_path(TRACECMD_BIN_DIR NAMES trace-cmd) find_path(TRACECMD_INCLUDE_DIR NAMES trace-cmd/trace-cmd.h) -find_library(TRACECMD_LIBRARY_DIR NAMES trace-cmd/libtracecmd.a) -find_library(TRACEEVENT_LIBRARY_DIR NAMES traceevent/libtraceevent.a) +find_library(TRACECMD_LIBRARY_DIR NAMES trace-cmd/libtracecmd.so) +find_library(TRACEEVENT_LIBRARY_DIR NAMES traceevent/libtraceevent.so) IF (TRACECMD_INCLUDE_DIR AND TRACECMD_LIBRARY_DIR) SET(TRACECMD_FOUND TRUE) - SET(TRACECMD_LIBRARY "${TRACECMD_LIBRARY_DIR}/trace-cmd/libtracecmd.a") + SET(TRACECMD_LIBRARY "${TRACECMD_LIBRARY_DIR}/trace-cmd/libtracecmd.so") ENDIF (TRACECMD_INCLUDE_DIR AND TRACECMD_LIBRARY_DIR) @@ -61,7 +61,7 @@ ENDIF (TRACECMD_FOUND) IF (TRACEEVENT_LIBRARY_DIR) SET(TRACEEVENT_FOUND TRUE) - SET(TRACEEVENT_LIBRARY "${TRACEEVENT_LIBRARY_DIR}/traceevent/libtraceevent.a") + SET(TRACEEVENT_LIBRARY "${TRACEEVENT_LIBRARY_DIR}/traceevent/libtraceevent.so") ENDIF (TRACEEVENT_LIBRARY_DIR) From patchwork Thu May 23 15:18:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yordan Karadzhov X-Patchwork-Id: 10958031 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D1CBB1708 for ; Thu, 23 May 2019 15:18:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BA6582867C for ; Thu, 23 May 2019 15:18:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AF2892864A; Thu, 23 May 2019 15:18:51 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5179D28676 for ; Thu, 23 May 2019 15:18:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730904AbfEWPSu (ORCPT ); Thu, 23 May 2019 11:18:50 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:37575 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731173AbfEWPSs (ORCPT ); Thu, 23 May 2019 11:18:48 -0400 Received: by mail-wr1-f66.google.com with SMTP id e15so6743904wrs.4 for ; Thu, 23 May 2019 08:18:47 -0700 (PDT) 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=RlPSX2f46myCSZN6xZyY1xUFxQFevAdG7+SpzfBhUK0=; b=Tf1OsfwUllZLaZuSmMXUm3BGg4hw+n0rW89pzFmxTwF4cO4SIRmdhT9bNZR1DYvMJ4 7jageiFFRepxxTfghsbX64ZCYXdxRqj2bU7o+wmtoLn04V0/k26VGykkT+XyGujNR4if l8X/0sbL6vnAiX/ye8GKFp69fG+wiLGZWRwRt7uOx7XIhuiEJGbDEDHyuXONBwZh9rt7 tMncHcThlSRWTm/GU6GTXBGeF1A6aKcyyKpIxpVzRWdcUTjqn42RbyYo+4UglrIj3hpa JP6rkHMGsbjNwp7/rnMVNFUv4kPGgULC1HBdolJWxRnyoDAMZ2UGAfc/YvhBSpRB3FuK ORlg== X-Gm-Message-State: APjAAAVyzYKk49ib3tSDOfbmVRwGXh1PsSmvPXCqNviR38CbPimdDOZS +3Rd4eYZSH+L1GCv6VbnnW0= X-Google-Smtp-Source: APXvYqx0nkJR+2h6iZQXInL3oldBxnvpuKll0l99jcIygyAc4fLKy/WkKGqXssC0kncijqDeanZadw== X-Received: by 2002:adf:f488:: with SMTP id l8mr23748287wro.287.1558624726740; Thu, 23 May 2019 08:18:46 -0700 (PDT) Received: from mamba.eng.vmware.com ([146.247.46.5]) by smtp.gmail.com with ESMTPSA id x9sm12687071wmf.27.2019.05.23.08.18.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 May 2019 08:18:46 -0700 (PDT) From: Yordan Karadzhov To: rostedt@goodmis.org Cc: linux-trace-devel@vger.kernel.org, y.karadz@gmail.com, Yordan Karadzhov Subject: [PATCH 4/5] trace-cmd: Install public interface headers Date: Thu, 23 May 2019 18:18:11 +0300 Message-Id: <20190523151812.31391-5-ykaradzhov@vmware.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190523151812.31391-1-ykaradzhov@vmware.com> References: <20190523151812.31391-1-ykaradzhov@vmware.com> MIME-Version: 1.0 Sender: linux-trace-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Installing the header files included in the public interfaces of the trace-cmd libraries will make possible the libraries to be used for development. Signed-off-by: Yordan Karadzhov --- Makefile | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index cde45f8..ac514b1 100644 --- a/Makefile +++ b/Makefile @@ -49,10 +49,18 @@ html_install = $(prefix)/share/kernelshark/html html_install_SQ = '$(subst ','\'',$(html_install))' img_install = $(prefix)/share/kernelshark/html/images img_install_SQ = '$(subst ','\'',$(img_install))' -libdir ?= $(prefix)/lib -libdir_SQ = '$(subst ','\'',$(libdir))' -includedir = $(prefix)/include/trace-cmd -includedir_SQ = '$(subst ','\'',$(includedir))' + +tcmd_libdir ?= $(prefix)/lib/trace-cmd +tcmd_libdir_SQ = '$(subst ','\'',$(tcmd_libdir))' + +tevt_libdir ?= $(prefix)/lib/traceevent +tevt_libdir_SQ = '$(subst ','\'',$(tevt_libdir))' + +tcmd_includedir = $(prefix)/include/trace-cmd +tcmd_includedir_SQ = '$(subst ','\'',$(tcmd_includedir))' + +tevt_includedir = $(prefix)/include/traceevent +tevt_includedir_SQ = '$(subst ','\'',$(tevt_includedir))' export man_dir man_dir_SQ html_install html_install_SQ INSTALL export img_install img_install_SQ @@ -335,10 +343,12 @@ install_gui: install_cmd gui $(Q)$(MAKE) $(S) -C $(kshark-dir)/build install install_libs: libs - $(Q)$(call do_install,$(LIBTRACECMD_SHARED),$(libdir_SQ)) - $(Q)$(call do_install,$(LIBTRACEEVENT_SHARED),$(libdir_SQ)) - $(Q)$(call do_install,$(src)/include/traceevent/event-parse.h,$(includedir_SQ)) - $(Q)$(call do_install,$(src)/include/trace-cmd/trace-cmd.h,$(includedir_SQ)) + $(Q)$(call do_install,$(LIBTRACECMD_SHARED),$(tcmd_libdir_SQ)) + $(Q)$(call do_install,$(LIBTRACEEVENT_SHARED),$(tevt_libdir_SQ)) + $(Q)$(call do_install,$(src)/include/traceevent/event-parse.h,$(tevt_includedir_SQ)) + $(Q)$(call do_install,$(src)/include/traceevent/trace-seq.h,$(tevt_includedir_SQ)) + $(Q)$(call do_install,$(src)/include/trace-cmd/trace-cmd.h,$(tcmd_includedir_SQ)) + $(Q)$(call do_install,$(src)/include/trace-cmd/trace-filter-hash.h,$(tcmd_includedir_SQ)) doc: $(MAKE) -C $(src)/Documentation all From patchwork Thu May 23 15:18:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yordan Karadzhov X-Patchwork-Id: 10958035 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 192CC1708 for ; Thu, 23 May 2019 15:18:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 051E0284A5 for ; Thu, 23 May 2019 15:18:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EDD7228613; Thu, 23 May 2019 15:18:52 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 716332864F for ; Thu, 23 May 2019 15:18:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731199AbfEWPSu (ORCPT ); Thu, 23 May 2019 11:18:50 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:35239 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730904AbfEWPSt (ORCPT ); Thu, 23 May 2019 11:18:49 -0400 Received: by mail-wm1-f67.google.com with SMTP id w9so89402wmi.0 for ; Thu, 23 May 2019 08:18:48 -0700 (PDT) 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=h31ubIrqnTVFVpMzr7o0ILyxaQapcHRERfA3iiyz+XM=; b=uPoXYRvIiDhL9U8o4WBf+nw0wzGUvioXDW4pp7PTy839bj5S1UAE4t9Fh55FrckaV0 VCv1utOCN1gVIcYtOeLckpXp+qO5gRCpXZj11PYw0mmZG0eckdt/4GPhRx1DvYqW/yzB qr59ia+FJEw07LnXb3aqLz5csuR0G+5B6Kj0jJFZUQOuNL/VgtzGxHE4YmnrfWEPE3mj HM+0w6atuUyXzMyTlm+TY6g5OsS6kHw6brF/jTzWU5SOqElkz70JApzc1qlpPFDmF/6e LqNTpc9e4vQ8oWbmMXzIbcsILZESAbitTu6teippP7U7fWNw8OdfkbGtsWXz987Ujfju 7dIQ== X-Gm-Message-State: APjAAAXBbzGUx100UC4UdYWLxtyfLlRS9WUWB1iDdK4s6jJEKKWcbjlA EjCW8eIOFpjf4q2DD5/KsB4= X-Google-Smtp-Source: APXvYqwvzEiboYWEfeIv8qSxTZK7+3yBj5c8aUiDuy4+ZbDRg12F4jmc/I+0yzq2+7eVXW2DoLjf+g== X-Received: by 2002:a1c:1d4:: with SMTP id 203mr13265517wmb.76.1558624728060; Thu, 23 May 2019 08:18:48 -0700 (PDT) Received: from mamba.eng.vmware.com ([146.247.46.5]) by smtp.gmail.com with ESMTPSA id x9sm12687071wmf.27.2019.05.23.08.18.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 May 2019 08:18:47 -0700 (PDT) From: Yordan Karadzhov To: rostedt@goodmis.org Cc: linux-trace-devel@vger.kernel.org, y.karadz@gmail.com, Yordan Karadzhov Subject: [PATCH 5/5] kernel-shark: Install public interface headers Date: Thu, 23 May 2019 18:18:12 +0300 Message-Id: <20190523151812.31391-6-ykaradzhov@vmware.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190523151812.31391-1-ykaradzhov@vmware.com> References: <20190523151812.31391-1-ykaradzhov@vmware.com> MIME-Version: 1.0 Sender: linux-trace-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Installing the header files included in the public interfaces of the KernelShark libraries will make possible the libraries to be used for development. A symbolic link that points to the latest versions of the libraries is added to INSTALL_PREFIX/lib/kernelshark Signed-off-by: Yordan Karadzhov --- kernel-shark/README | 4 ++++ kernel-shark/src/CMakeLists.txt | 42 +++++++++++++++++++++++++++++++-- 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/kernel-shark/README b/kernel-shark/README index 379c390..573e279 100644 --- a/kernel-shark/README +++ b/kernel-shark/README @@ -44,6 +44,10 @@ as a CMake Command-Line option. 2.1.3 By default, installation prefix is "/usr/local". It can be changed using -D_INSTALL_PREFIX= as a CMake Command-Line option. +2.1.4 In order to install a development version (including headers e.t.c) add +-D_DEVEL=1 as a CMake Command-Line option. + + Example: cmake -D_DOXYGEN_DOC=1 -D_DEBUG=1 -D_INSTALL_PREFIX=/usr ../ diff --git a/kernel-shark/src/CMakeLists.txt b/kernel-shark/src/CMakeLists.txt index 6cbc00f..6dd9b5a 100644 --- a/kernel-shark/src/CMakeLists.txt +++ b/kernel-shark/src/CMakeLists.txt @@ -1,5 +1,13 @@ message("\n src ...") +macro(install_symlink filepath sympath) + install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${filepath} ${sympath})") + install(CODE "LIST(APPEND CMAKE_INSTALL_MANIFEST_FILES ${sympath})") + install(CODE "message(\"-- Created symlink: ${sympath} -> ${filepath}\")") +endmacro(install_symlink) + +set(KS_INCLUDS_DESTINATION "${_INSTALL_PREFIX}/include/${KS_APP_NAME}") + message(STATUS "libkshark") add_library(kshark SHARED libkshark.c libkshark-model.c @@ -14,6 +22,22 @@ target_link_libraries(kshark ${CMAKE_DL_LIBS} set_target_properties(kshark PROPERTIES SUFFIX ".so.${KS_VERSION_STRING}") +install(TARGETS kshark LIBRARY DESTINATION ${_INSTALL_PREFIX}/lib/${KS_APP_NAME}) + +if (_DEVEL) + + install_symlink("libkshark.so.${KS_VERSION_STRING}" + "${_INSTALL_PREFIX}/lib/${KS_APP_NAME}/libkshark.so") + + install(FILES "${KS_DIR}/src/libkshark.h" + DESTINATION ${KS_INCLUDS_DESTINATION}) + install(FILES "${KS_DIR}/src/libkshark-plugin.h" + DESTINATION ${KS_INCLUDS_DESTINATION}) + install(FILES "${KS_DIR}/src/libkshark-model.h" + DESTINATION ${KS_INCLUDS_DESTINATION}) + +endif (_DEVEL) + if (OPENGL_FOUND AND GLUT_FOUND) message(STATUS "libkshark-plot") @@ -26,6 +50,20 @@ if (OPENGL_FOUND AND GLUT_FOUND) set_target_properties(kshark-plot PROPERTIES SUFFIX ".so.${KS_VERSION_STRING}") + install(TARGETS kshark-plot LIBRARY DESTINATION ${_INSTALL_PREFIX}/lib/${KS_APP_NAME}) + + if (_DEVEL) + + install_symlink("libkshark-plot.so.${KS_VERSION_STRING}" + "${_INSTALL_PREFIX}/lib/${KS_APP_NAME}/libkshark-plot.so") + + install(FILES "${KS_DIR}/src/KsPlotTools.hpp" + DESTINATION ${KS_INCLUDS_DESTINATION}) + install(FILES "${KS_DIR}/src/libkshark-plot.h" + DESTINATION ${KS_INCLUDS_DESTINATION}) + + endif (_DEVEL) + endif (OPENGL_FOUND AND GLUT_FOUND) if (Qt5Widgets_FOUND AND Qt5Network_FOUND) @@ -77,9 +115,9 @@ if (Qt5Widgets_FOUND AND Qt5Network_FOUND) add_executable(kshark-record kshark-record.cpp) target_link_libraries(kshark-record kshark-gui) - install(TARGETS ${KS_APP_NAME} kshark-record kshark kshark-plot kshark-gui + install(TARGETS ${KS_APP_NAME} kshark-record kshark-gui RUNTIME DESTINATION ${_INSTALL_PREFIX}/bin/ - LIBRARY DESTINATION ${_INSTALL_PREFIX}/lib/${KS_APP_NAME}/) + LIBRARY DESTINATION ${_INSTALL_PREFIX}/lib/${KS_APP_NAME}) install(FILES "${KS_DIR}/${KS_APP_NAME}.desktop" DESTINATION ${_INSTALL_PREFIX}/share/applications/)