From patchwork Mon Jul 27 07:18:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Tzvetomir Stoyanov (VMware)" X-Patchwork-Id: 11686415 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9EE92138C for ; Mon, 27 Jul 2020 07:18:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7F8232072E for ; Mon, 27 Jul 2020 07:18:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LYOsT/gX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726387AbgG0HS3 (ORCPT ); Mon, 27 Jul 2020 03:18:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726171AbgG0HS3 (ORCPT ); Mon, 27 Jul 2020 03:18:29 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B04B7C0619D2 for ; Mon, 27 Jul 2020 00:18:28 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id a5so3746155wrm.6 for ; Mon, 27 Jul 2020 00:18:28 -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=6L53opn/gakiOJoGbLA4LSBmjPGetUemut73KkwNRAc=; b=LYOsT/gX603LGDCgjvZVrJG4Tjyo7WpprgXv3mhoCGp6VQBW7ySV1Ti9XZEinmWu60 p2TPKNLjrlcDqfj7w/O9xR2iRv8rLvhyJ4/NW/NhUR24WCjAg4XlR54fPRoMv/hfwjaf oKRyOchir/80PxKt7a4fLqbdFvcDAhe4X4M3FwocnTtU1oDu8VCVPX9x4DBwdbWX1cud nDeRpwnkY0tkHpfbwy5cLpwHXWbL6wq1saVbzXpR6jrYdsBL4E4MISdmVdGKk6Ce21th J8m7Xt4i9hZMV7wubN2BtT1MzHK6nuKMbzswtE7I5T1gK0NyJs0DhDND2yt6d+zivLY9 Xf9A== 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=6L53opn/gakiOJoGbLA4LSBmjPGetUemut73KkwNRAc=; b=Gq6WlsFif392CR1vLnhi2DaHClXUrkdjcVrZKbAcAKkddfVzEtAeCIOUMVcAeoq+hf 7hBaJ80StqSOAQr3XKFQVdWoqKjXnXUVS74wuEj/UNVdEDNYqimpPTOl68JmetHB6bNZ pHlnhUKgIgzGz/WQJO/v4lEKua/wanJUEmOT/jdbNDmsHmSdmMxIx7HFLKbJ0jJWWwi+ Wazkpwg+Agk9K2v2PXtCcE4HYFEvjkR+rdD9kL8FYg7vlTs2JEZLFo3CefDFgfcMMRAe E3qPotDg2D1CjiowKnWd8zWG+awpu3V3o629EK1lisKRt3ogFXdx0hrlVQwliBd0bhzO NI3g== X-Gm-Message-State: AOAM532XWmghNRAu1HhmTHvsjxuSkWDnfEd7ykxYeP47EIP03v1z8SAC JkkAVO1fjTOPYYOs0QePwal8kqIfQlI= X-Google-Smtp-Source: ABdhPJyR/J5fo6xIlrhoOHIaGLCcLWeq7ubeV0khW1Z/2UV6qs2v0QhjTDfGPZaLRFhdu/PgoGEeaA== X-Received: by 2002:adf:d084:: with SMTP id y4mr18435234wrh.161.1595834307466; Mon, 27 Jul 2020 00:18:27 -0700 (PDT) Received: from oberon.zico.biz ([83.222.187.186]) by smtp.gmail.com with ESMTPSA id j24sm12312162wrb.49.2020.07.27.00.18.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 00:18:26 -0700 (PDT) From: "Tzvetomir Stoyanov (VMware)" To: rostedt@goodmis.org Cc: linux-trace-devel@vger.kernel.org Subject: [PATCH 1/5] KernelShark: Add stream name Date: Mon, 27 Jul 2020 10:18:19 +0300 Message-Id: <20200727071823.169962-2-tz.stoyanov@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200727071823.169962-1-tz.stoyanov@gmail.com> References: <20200727071823.169962-1-tz.stoyanov@gmail.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 From: Tzvetomir (VMware) Stoyanov There are use cases when multiple streams can be loaded from a single file. Ftrace instances are such example. In these cases file name could not be used to identify the streams. A new member 'name' is added to the 'struct kshark_data_stream', used to identify the streams by the user. By default name is equal to the file name, in cases where there is onle one stream in the file the behaviour is not changed. When there are multiple streams in a single file, the name is formed as "file name:stream name". Signed-off-by: Tzvetomir (VMware) Stoyanov Reviewed-by: Steven Rostedt (VMware) --- src/KsAdvFilteringDialog.cpp | 2 +- src/KsWidgetsLib.cpp | 6 +++--- src/libkshark-plugin.c | 2 +- src/libkshark.c | 2 ++ src/libkshark.h | 3 +++ src/plugins/KVMCombo.cpp | 4 ++-- src/plugins/event_field_plot.c | 2 +- src/plugins/latency_plot.c | 4 ++-- 8 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/KsAdvFilteringDialog.cpp b/src/KsAdvFilteringDialog.cpp index 64c4cec..6979903 100644 --- a/src/KsAdvFilteringDialog.cpp +++ b/src/KsAdvFilteringDialog.cpp @@ -236,7 +236,7 @@ void KsAdvFilteringDialog::_getFtraceStreams(kshark_context *kshark_ctx) for (int i = 0; i < kshark_ctx->n_streams; ++i) { stream = kshark_ctx->stream[streamIds[i]]; if (stream->format == KS_TEP_DATA) - _streamComboBox.addItem(QString(stream->file), + _streamComboBox.addItem(QString(stream->name), streamIds[i]); } diff --git a/src/KsWidgetsLib.cpp b/src/KsWidgetsLib.cpp index e487eb8..f006a13 100644 --- a/src/KsWidgetsLib.cpp +++ b/src/KsWidgetsLib.cpp @@ -325,7 +325,7 @@ void KsCheckBoxWidget::_setStream(uint8_t sd) if (!stream) return; - _streamName = QString(stream->file); + _streamName = QString(stream->name); KsUtils::setElidedText(&_stramLabel, _streamName, Qt::ElideLeft, width()); @@ -1148,7 +1148,7 @@ KsDStreamCheckBoxWidget::KsDStreamCheckBoxWidget(QWidget *parent) for (int i = 0; i < nStreams; ++i) { stream = kshark_ctx->stream[streamIds[i]]; - QString name(stream->file); + QString name(stream->name); if (name < 40) { nameItem = new QTableWidgetItem(name); } else { @@ -1235,7 +1235,7 @@ void KsEventFieldSelectWidget::setStreamCombo() sd = streamIds[i]; stream = kshark_ctx->stream[sd]; if (_streamComboBox.findData(sd) < 0) - _streamComboBox.addItem(QString(stream->file), sd); + _streamComboBox.addItem(QString(stream->name), sd); } free(streamIds); } diff --git a/src/libkshark-plugin.c b/src/libkshark-plugin.c index d341fea..583ea42 100644 --- a/src/libkshark-plugin.c +++ b/src/libkshark-plugin.c @@ -584,7 +584,7 @@ static void plugin_init(struct kshark_data_stream *stream, fprintf(stderr, "plugin \"%s\" failed to initialize on stream %s\n", plugin->interface->name, - stream->file); + stream->name); plugin->status |= KSHARK_PLUGIN_FAILED; plugin->status &= ~KSHARK_PLUGIN_LOADED; diff --git a/src/libkshark.c b/src/libkshark.c index 7013d66..375874d 100644 --- a/src/libkshark.c +++ b/src/libkshark.c @@ -137,6 +137,7 @@ static void kshark_stream_free(struct kshark_data_stream *stream) free(stream->calib_array); free(stream->file); + free(stream->name); free(stream); } @@ -255,6 +256,7 @@ int kshark_stream_open(struct kshark_data_stream *stream, const char *file) return -EAGAIN; stream->file = strdup(file); + stream->name = strdup(file); set_format(kshark_ctx, stream, file); switch (stream->format) { diff --git a/src/libkshark.h b/src/libkshark.h index 0b9053d..44bec79 100644 --- a/src/libkshark.h +++ b/src/libkshark.h @@ -238,6 +238,9 @@ struct kshark_data_stream { /** Trace data file pathname. */ char *file; + /** Stream name. */ + char *name; + /** System clock calibration function. */ time_calib_func calib; diff --git a/src/plugins/KVMCombo.cpp b/src/plugins/KVMCombo.cpp index 9b9d7a0..ceb1f47 100644 --- a/src/plugins/KVMCombo.cpp +++ b/src/plugins/KVMCombo.cpp @@ -250,7 +250,7 @@ void KsComboPlotDialog::update() _guestMapCount = ret; KsUtils::setElidedText(&_hostFileLabel, - kshark_ctx->stream[_guestMap[0].host_id]->file, + kshark_ctx->stream[_guestMap[0].host_id]->name, Qt::ElideLeft, LABEL_WIDTH); _guestStreamComboBox.clear(); @@ -260,7 +260,7 @@ void KsComboPlotDialog::update() if (sd >= kshark_ctx->n_streams) continue; - _guestStreamComboBox.addItem(kshark_ctx->stream[sd]->file, sd); + _guestStreamComboBox.addItem(kshark_ctx->stream[sd]->name, sd); color << colTable[sd]; _guestStreamComboBox.setItemData(i, QBrush(color), Qt::BackgroundRole); diff --git a/src/plugins/event_field_plot.c b/src/plugins/event_field_plot.c index fcc2a19..3c61cbf 100644 --- a/src/plugins/event_field_plot.c +++ b/src/plugins/event_field_plot.c @@ -72,7 +72,7 @@ plugin_efp_init_context(struct kshark_data_stream *stream) if (plugin_ctx->event_id < 0) { fprintf(stderr, "Event %s not found in stream %s\n", - plugin_ctx->event_name, stream->file); + plugin_ctx->event_name, stream->name); goto fail; } diff --git a/src/plugins/latency_plot.c b/src/plugins/latency_plot.c index bcd27f6..e2238e4 100644 --- a/src/plugins/latency_plot.c +++ b/src/plugins/latency_plot.c @@ -75,7 +75,7 @@ plugin_latency_init_context(struct kshark_data_stream *stream) stream->interface.find_event_id(stream, plugin_ctx->event_name[0]); if (plugin_ctx->event_id[0] < 0) { fprintf(stderr, "Event %s not found in stream %s\n", - plugin_ctx->event_name[0], stream->file); + plugin_ctx->event_name[0], stream->name); goto fail; } @@ -83,7 +83,7 @@ plugin_latency_init_context(struct kshark_data_stream *stream) stream->interface.find_event_id(stream, plugin_ctx->event_name[1]); if (plugin_ctx->event_id[1] < 0) { fprintf(stderr, "Event %s not found in stream %s\n", - plugin_ctx->event_name[1], stream->file); + plugin_ctx->event_name[1], stream->name); goto fail; } From patchwork Mon Jul 27 07:18:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Tzvetomir Stoyanov (VMware)" X-Patchwork-Id: 11686417 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 887006C1 for ; Mon, 27 Jul 2020 07:18:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6E8C42072E for ; Mon, 27 Jul 2020 07:18:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TVsdpRxV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726433AbgG0HSa (ORCPT ); Mon, 27 Jul 2020 03:18:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726171AbgG0HS3 (ORCPT ); Mon, 27 Jul 2020 03:18:29 -0400 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3B54C0619D2 for ; Mon, 27 Jul 2020 00:18:29 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id 184so13649801wmb.0 for ; Mon, 27 Jul 2020 00:18:29 -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=xX9tbAaXa30JAoxFlbW3MjjRPYPFtUW0nlkm78CuPKI=; b=TVsdpRxVRVfo7xvb2lqUlPL31TwIDfm1VxSaKJMcYp0jGB2pgCP5iYa6Qs/UnEsoD8 ynIL8Pl/D2kggNxYUiH1OAIl6a9OSSxXhvGzoTNUqUMfQ9C5tai/9vi2C/un7Nui8h8M hOzhGO/9aC4LdewRCiXXDcbzwyKySVP3vw3PZFHB+wnW2JAEkbek/EpxkW6fpHrkfXio WCo9YFbXO1POUx76bEwhFA9iXO/xL32UySdCSr6jVT/lB3pkWCXKFQIt6upUFfw8/6wV xdG3dDaXdbvHXrcfCla+hRsVzPoCLFWvF03Ca83gCZQzI+dxAXLAhxxg9SZNdgGR3zoQ Cg2A== 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=xX9tbAaXa30JAoxFlbW3MjjRPYPFtUW0nlkm78CuPKI=; b=BRdDk3XueKtwoHyb1ll5B3jAV60ptMVWmL0H3660f72RMsQiQE3uXqXiMyCD935+I8 w+YLno+0vd2QtDcTHHVjDnE1jEApKqXvVV/21LzVRhaIhdt5jNBGx0d/TrGG9FN+6KRT 4ToA2ucMR/f9vjdBjBqeRYs5P/5DYw4qzYPXnTOhj+gVHvEyyNjUSUo0Qc1yePMLY2fi kzS/skjTJJ12wdyKKZz/O5bP4uBVKmBzON0Juv/WmLbJUf6g/39TBcQsRHFqagel5dI4 4PbDpfuBO64pcBvBPics4GnlXcVM1wUuL/2/vfjlcPfPcHvrk0X7BS3dJ36omHdlr3nS RQ6A== X-Gm-Message-State: AOAM531MjmL6sJt2e5ET+Se+RHhsZrI+B1a+5fa9ggfsVZGR95arq8MQ Z8KISShPdKR4BertvOe4oXk= X-Google-Smtp-Source: ABdhPJx2OkiHr71ng4x0R22O0Z5k3DJJ0DI7jM/QQC1Eb6MShU4c/Tmh44jn/BN6cliITuFr3so/sA== X-Received: by 2002:a1c:5646:: with SMTP id k67mr20020883wmb.61.1595834308430; Mon, 27 Jul 2020 00:18:28 -0700 (PDT) Received: from oberon.zico.biz ([83.222.187.186]) by smtp.gmail.com with ESMTPSA id j24sm12312162wrb.49.2020.07.27.00.18.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 00:18:27 -0700 (PDT) From: "Tzvetomir Stoyanov (VMware)" To: rostedt@goodmis.org Cc: linux-trace-devel@vger.kernel.org Subject: [PATCH 2/5] KernelShark: Fix compilation issues on Fedora 32 Date: Mon, 27 Jul 2020 10:18:20 +0300 Message-Id: <20200727071823.169962-3-tz.stoyanov@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200727071823.169962-1-tz.stoyanov@gmail.com> References: <20200727071823.169962-1-tz.stoyanov@gmail.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 From: Tzvetomir (VMware) Stoyanov Included to fix this compilation error: "error: ‘string’ in namespace ‘std’ does not name a type" Converted fontHeight and stringWidth to inline to fix these compilation errors: "multiple definition of `fontHeight';" "multiple definition of `stringWidth';" Signed-off-by: Tzvetomir (VMware) Stoyanov Reviewed-by: Steven Rostedt (VMware) --- src/KsPlotTools.cpp | 1 + src/KsPlotTools.hpp | 1 + src/KsUtils.hpp | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/KsPlotTools.cpp b/src/KsPlotTools.cpp index 17db451..7dcd4f2 100644 --- a/src/KsPlotTools.cpp +++ b/src/KsPlotTools.cpp @@ -12,6 +12,7 @@ // C #include #include +#include // C++ #include diff --git a/src/KsPlotTools.hpp b/src/KsPlotTools.hpp index 75fb4da..c66fea3 100644 --- a/src/KsPlotTools.hpp +++ b/src/KsPlotTools.hpp @@ -14,6 +14,7 @@ // C #include +#include // C++ #include diff --git a/src/KsUtils.hpp b/src/KsUtils.hpp index cfb45f4..5857099 100644 --- a/src/KsUtils.hpp +++ b/src/KsUtils.hpp @@ -36,7 +36,7 @@ //! @cond Doxygen_Suppress -auto fontHeight = []() +inline auto fontHeight = []() { QFont font; QFontMetrics fm(font); @@ -44,7 +44,7 @@ auto fontHeight = []() return fm.height(); }; -auto stringWidth = [](QString s) +inline auto stringWidth = [](QString s) { QFont font; QFontMetrics fm(font); From patchwork Mon Jul 27 07:18:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Tzvetomir Stoyanov (VMware)" X-Patchwork-Id: 11686419 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D3B0A138A for ; Mon, 27 Jul 2020 07:18:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B8B3220672 for ; Mon, 27 Jul 2020 07:18:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RO6qjVNc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726444AbgG0HSb (ORCPT ); Mon, 27 Jul 2020 03:18:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726171AbgG0HSb (ORCPT ); Mon, 27 Jul 2020 03:18:31 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5E8BC0619D2 for ; Mon, 27 Jul 2020 00:18:30 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id z18so10172952wrm.12 for ; Mon, 27 Jul 2020 00:18:30 -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=bYLkuNrXDKiXPijLaugrWX0mIr9Lg917hMvbMjuz0Jg=; b=RO6qjVNc9KA9rZojoSByVbD3dFnxiGnXLN2sPd5/3joU17jNNbINJ0aXKJDy6hbYbR q2sAyaYUjMqv5LanikTulyETz2fcD+gNJGd4oFMTLW/35Xh1SHrH1qyeXHDVjan1X8Kd LdwqBH7W3+6Kry/uGm5JLC+Cobaegru2ZEC33NRSQ/2ox0+CyxbfaHBzy1Zt5u8cbrE3 DCCe3CIYv7xfWAkLLerzLhZiWoJudwkItahv6pmBCOTQTRriCrbp/Q9jVTapSt38aF18 5AL42OR+3z4xL/y+cbRik+M2DfKEKNBQPdG+thrfU0f+r9bIyiJzP7p6TvHd64bF2ZKR RGRw== 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=bYLkuNrXDKiXPijLaugrWX0mIr9Lg917hMvbMjuz0Jg=; b=TAFIAnSfCb+3tbLIs65EP18AHA09S6S+5jbxyCraA5heYdw4U3SHov46/Wa4uOzDs+ Fj6iVfYI14tXyXI5FJKcS5O7gvz1lb877TgmfbfJSg2BeenWJU2UZCjcsbgh+AE7os8q C6Yc6xGN6PuCTIOtEAzeo+NEuyMenk6lj2/zhTTNVyLCUeIwhnCnIOgFcbKoELb6ej7P noO2tZvGQKiP/gFBAyWuk+M4Scvthdwy1iabnHC5whmS9kFof9pWCzCLGDoplolf7kBQ 8IRtf6TkxA3bXrWshyOqWalXBnouFwkoXbu3DDdiCoPCceGplxHZFTgYWg/Ij4V1LXIz ypdA== X-Gm-Message-State: AOAM530cHsxcb0KuM3D56xgYez7997pUqeylvT7gYfWziYO7fG1kpMh4 M0OK5T+jPk9XXRE4s18m8qo= X-Google-Smtp-Source: ABdhPJxuyUfJcmaKn/Tky0dTBczH098OVGWtXo1NSL2qQlJir3+sWFWvlD8XGdW/4I3w4wNAbGn1sw== X-Received: by 2002:a5d:514c:: with SMTP id u12mr19794076wrt.90.1595834309747; Mon, 27 Jul 2020 00:18:29 -0700 (PDT) Received: from oberon.zico.biz ([83.222.187.186]) by smtp.gmail.com with ESMTPSA id j24sm12312162wrb.49.2020.07.27.00.18.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 00:18:29 -0700 (PDT) From: "Tzvetomir Stoyanov (VMware)" To: rostedt@goodmis.org Cc: linux-trace-devel@vger.kernel.org Subject: [PATCH 3/5] KernelShark: Fix combo plot plugin crash in case of multiple streams Date: Mon, 27 Jul 2020 10:18:21 +0300 Message-Id: <20200727071823.169962-4-tz.stoyanov@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200727071823.169962-1-tz.stoyanov@gmail.com> References: <20200727071823.169962-1-tz.stoyanov@gmail.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 From: Tzvetomir (VMware) Stoyanov Added a check if there is a host-guest mapping in the loaded multiple streams. If there is no such mapping, print an error and exit the KsComboPlotDialog::update() function. Signed-off-by: Tzvetomir (VMware) Stoyanov Reviewed-by: Steven Rostedt (VMware) --- src/plugins/KVMCombo.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugins/KVMCombo.cpp b/src/plugins/KVMCombo.cpp index ceb1f47..3ec36b6 100644 --- a/src/plugins/KVMCombo.cpp +++ b/src/plugins/KVMCombo.cpp @@ -246,7 +246,12 @@ void KsComboPlotDialog::update() _guestMap = nullptr; _guestMapCount = 0; ret = kshark_tracecmd_get_hostguest_mapping(&_guestMap); - if (ret > 0) + if (ret <= 0) { + QString err("Cannot find host / guest tracing into the loaded streams"); + QMessageBox msgBox; + msgBox.critical(nullptr, "Error", err); + return; + } else _guestMapCount = ret; KsUtils::setElidedText(&_hostFileLabel, From patchwork Mon Jul 27 07:18:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Tzvetomir Stoyanov (VMware)" X-Patchwork-Id: 11686421 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 197D76C1 for ; Mon, 27 Jul 2020 07:18:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EE7462072E for ; Mon, 27 Jul 2020 07:18:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BSnffuRk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726451AbgG0HSc (ORCPT ); Mon, 27 Jul 2020 03:18:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726171AbgG0HSc (ORCPT ); Mon, 27 Jul 2020 03:18:32 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 173C1C0619D2 for ; Mon, 27 Jul 2020 00:18:32 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id a14so13751411wra.5 for ; Mon, 27 Jul 2020 00:18:32 -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=1k5gPKYRnQprZKJ3rZxnNqBSMyTLaKsUKrZ5PCm4l20=; b=BSnffuRkaPrBsh++WWse/PR+F2gN5NVDsF9+F27nRGD+eCSfV5FFOOf7XoB8GKzRhC IgNmQsdIYwOT83xcAsIMR46Th0zaaMVpfOxW6zbTZhI+c4kzLj8FFheCP8etFzKSjYje HcQDJ4Li5f0GCoJiGgGGhWh+z4XC7upVLeWteJ5vU3HIxvY2LVYdrDYoGHcWQLU0fDA0 ZQAjThGAUNejFZQpe2fNDEIfTYrwftwiOiqzP+zGEqSUxEHVt7v8+flKOIQDEtBoETwa p1hcDFp+/+NDOipj0cWn6z3rvVo4Ra5EJeNJrTCEx7oF5M9Oa9wsJKRnwyN0WRSLjEr5 AJVw== 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=1k5gPKYRnQprZKJ3rZxnNqBSMyTLaKsUKrZ5PCm4l20=; b=D1WVCgGzIbhUzPpsWqGY/+wAmRXsPgre3/Jw7C72WFtebJjejwvBVfJIfkpiTurEwR WNsnTMdXjAFQm4h45lp6AldXLBkiLt/UJl2WvGNuvvaVswFXXYT3+5/LW8Xwi+Skllgm nfz0QeutUcc5+3hS62FfVExibUqwEjSuTDxgzkC6oUbpEiRS2fpf3J0iJmPxzKgQQsNZ wy7CU4WLHbcRSF6kttCXS92trJFzjAZgwIuy8pbc93984FgIaHje4+246lMBU+1yuc7Z xYP+6XNxnSkGAp5LYWmYjp8BR0tp+tRcH9VbSNpmkLvqBzNdj2fWwz1UliG48ej4ciH+ oKfg== X-Gm-Message-State: AOAM5307IPyzdQr18pGes3t0ekb4JIIXi9o974XG0Wv7T/32cc4CmLev tH+7FecxtVqqLKDSS/BNxnM= X-Google-Smtp-Source: ABdhPJxnK6HJBD0Lm+rl/w/MnShaSfCTrWN+kfSiVXSSEPWlDF+6PJ/81JdLZUtldMwfMv5l2LTiTA== X-Received: by 2002:adf:f8d0:: with SMTP id f16mr11823982wrq.66.1595834310808; Mon, 27 Jul 2020 00:18:30 -0700 (PDT) Received: from oberon.zico.biz ([83.222.187.186]) by smtp.gmail.com with ESMTPSA id j24sm12312162wrb.49.2020.07.27.00.18.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 00:18:30 -0700 (PDT) From: "Tzvetomir Stoyanov (VMware)" To: rostedt@goodmis.org Cc: linux-trace-devel@vger.kernel.org Subject: [PATCH 4/5] KernelShark: Load trace.dat file with ftrace sub-buffers Date: Mon, 27 Jul 2020 10:18:22 +0300 Message-Id: <20200727071823.169962-5-tz.stoyanov@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200727071823.169962-1-tz.stoyanov@gmail.com> References: <20200727071823.169962-1-tz.stoyanov@gmail.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 From: Tzvetomir (VMware) Stoyanov Ftrace supports parallel tracing in isolated ring buffers. Trace-cmd also supprts this ftrace functionality, it saves the data from all buffers into single trace.dat file. When such file is opened by KernelShark, it loads the tracing data only from the top biffer. Support for loading data from all buffers, located in a single trace.dat file, is added. Each buffer is loaded as different KernelShark session. Signed-off-by: Tzvetomir (VMware) Stoyanov --- src/libkshark-tepdata.c | 122 ++++++++++++++++++++++++++++++---------- 1 file changed, 92 insertions(+), 30 deletions(-) diff --git a/src/libkshark-tepdata.c b/src/libkshark-tepdata.c index efd8c82..4b3a57d 100644 --- a/src/libkshark-tepdata.c +++ b/src/libkshark-tepdata.c @@ -1134,55 +1134,60 @@ out: return peer_handle; } -/** Initialize the FTRACE data input (from file). */ -int kshark_tep_init_input(struct kshark_data_stream *stream, - const char *file) +static int kshark_tep_init_stream(struct kshark_context *kshark_ctx, + struct kshark_data_stream *stream, + const char *file, + struct kshark_data_stream *parent, + int instance) { - struct kshark_context *kshark_ctx = NULL; struct tepdata_handle *tep_handle; - struct kshark_plugin_list *plugin; + struct tepdata_handle *tep_parent; struct tracecmd_input *merge_peer; + struct kshark_plugin_list *plugin; struct tep_event *event; int i, n_tep_plugins; int ret; - - if (!kshark_instance(&kshark_ctx) || !init_thread_seq()) - return -EEXIST; - - /* - * Turn off function trace indent and turn on show parent - * if possible. - */ - tep_plugin_add_option("ftrace:parent", "1"); - tep_plugin_add_option("ftrace:indent", "0"); + char *name; tep_handle = calloc(1, sizeof(*tep_handle)); if (!tep_handle) return -EFAULT; - /** Open the tracing file, parse headers and create trace input context */ - tep_handle->input = tracecmd_open_head(file); - if (!tep_handle->input) { - free(tep_handle); - stream->interface.handle = NULL; - return -EEXIST; + if (!parent || instance < 0) { + /** Open the tracing file, parse headers and create trace input context */ + tep_handle->input = tracecmd_open_head(file); + if (!tep_handle->input) { + free(tep_handle); + stream->interface.handle = NULL; + return -EEXIST; + } + /** Find a merge peer from the same tracing session */ + merge_peer = kshark_tep_find_merge_peer(kshark_ctx, tep_handle->input); + if (merge_peer) + tracecmd_pair_peer(tep_handle->input, merge_peer); + + /** Read the racing data from the file */ + ret = tracecmd_init_data(tep_handle->input); + name = "top"; + } else { + tep_parent = (struct tepdata_handle *)parent->interface.handle; + name = tracecmd_buffer_instance_name(tep_parent->input, instance); + stream->file = strdup(file); + asprintf(&stream->name, "%s:%s", stream->file, name); + tep_handle->input = tracecmd_buffer_instance_handle(tep_parent->input, instance); + tracecmd_print_stats(tep_handle->input); + if (!tep_handle->input) + ret = -1; + else + ret = 0; } - /** Find a merge peer from the same tracing session */ - merge_peer = kshark_tep_find_merge_peer(kshark_ctx, tep_handle->input); - if (merge_peer) - tracecmd_pair_peer(tep_handle->input, merge_peer); - - /** Read the racing data from the file */ - ret = tracecmd_init_data(tep_handle->input); - if (ret < 0) { tracecmd_close(tep_handle->input); free(tep_handle); stream->interface.handle = NULL; return -EEXIST; } - tep_handle->tep = tracecmd_get_pevent(tep_handle->input); tep_handle->sched_switch_event_id = -EINVAL; @@ -1224,8 +1229,65 @@ int kshark_tep_init_input(struct kshark_data_stream *stream, } kshark_handle_all_dpis(stream, KSHARK_PLUGIN_INIT); + return 0; +} +/** Initialize the FTRACE data input (from file). */ +int kshark_tep_init_input(struct kshark_data_stream *stream, + const char *file) +{ + struct kshark_context *kshark_ctx = NULL; + struct kshark_data_stream *child_stream; + struct tepdata_handle *tep_handle; + int count; + int ret; + int sd; + int i; + + if (!kshark_instance(&kshark_ctx) || !init_thread_seq()) + return -EEXIST; + + /* + * Turn off function trace indent and turn on show parent + * if possible. + */ + tep_plugin_add_option("ftrace:parent", "1"); + tep_plugin_add_option("ftrace:indent", "0"); + + ret = kshark_tep_init_stream(kshark_ctx, stream, file, NULL, -1); + if (ret < 0) + return ret; + tep_handle = (struct tepdata_handle *)stream->interface.handle; + count = tracecmd_buffer_instances(tep_handle->input); + for (i = 0; i < count; i++) { + sd = kshark_add_stream(kshark_ctx); + if (sd < 0) { + ret = sd; + goto error; + } + child_stream = kshark_ctx->stream[sd]; + if (!child_stream) { + ret = -ENOMEM; + goto error; + } + if (pthread_mutex_init(&child_stream->input_mutex, NULL) != 0) { + ret = -EAGAIN; + goto error; + } + child_stream->format = KS_TEP_DATA; + ret = kshark_tep_init_stream(kshark_ctx, child_stream, file, stream, i); + if (ret < 0) + goto error; + kshark_ctx->n_streams++; + } return 0; + +error: + tracecmd_close(tep_handle->input); + free(tep_handle); + stream->interface.handle = NULL; + return ret; + } /** Initialize using the locally available tracing events. */ From patchwork Mon Jul 27 07:18:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Tzvetomir Stoyanov (VMware)" X-Patchwork-Id: 11686423 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1378F6C1 for ; Mon, 27 Jul 2020 07:18:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E959520792 for ; Mon, 27 Jul 2020 07:18:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nBZuo8OO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726513AbgG0HSd (ORCPT ); Mon, 27 Jul 2020 03:18:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726171AbgG0HSd (ORCPT ); Mon, 27 Jul 2020 03:18:33 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 202FFC0619D2 for ; Mon, 27 Jul 2020 00:18:33 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id g8so1971392wmk.3 for ; Mon, 27 Jul 2020 00:18:33 -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=BPxN0Ghj3w2l4jnmIbCvXUdceTQZ6JtOEaSS9JN8T3g=; b=nBZuo8OOI9Q4kiuIDfg+l02smDwhAbxTMNF3s/ykQwTvCp1UZhGQXD9JJdMrcirs/p CAk+rJiD34XdBoGxzUbz7QxRxh8778+mDbh3fTihAuakKtFIXBHC6t/ULJshsrMV3eRt lM6KqvRDl7LGwTtdCIIfLPwQ77fmvQuR1MLVgae2oFWSDqkmOWslNbRWo/VFUuVrvNja b5oM2UhBiZG370R1K2aqRfkUQQhr4MgASodycgZiyCPNmAhaX9di9bS41O1BOCs+dnWD ZpxP0ReRBS7yZlg5v/93hRXiKTp/91NCj4aMbGsVUUL9HGAnkw598hb+DaBjHpHd2l7Q x0nQ== 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=BPxN0Ghj3w2l4jnmIbCvXUdceTQZ6JtOEaSS9JN8T3g=; b=rSMPpyuZJmGAFuc2sz6UGXITQ/GVvWUCRr9ga9YdRrI2dQ4AEVYB6HUMPrJKkWTGku IN0IiEai+D9Zd687UNTqinJ0JEK5Ax/0SK5JnHjyCRcB79AYm1q9Si1JFsNQcRCMs1MU eqKI8W/h+7H+oIi0Els1dgKHXxJkJbQa6YYwGluuwivIq1mAWtfMR9Cbqlqa1+IF0Zej L+hhNX0abkDksznl+fe2QEp0OTwUTqGsDckits/yua4K/eYAx3GfVjDd10xooqLRTy7q n7oHGbubF6mUOmrbq8UtpmfI5d0s1zTurUcZi/5FC6fWMT8eY3kd/ueEt641GPS4wOxB jr3w== X-Gm-Message-State: AOAM533zVbQl7aAAX4I/MuVhSFwEHX2jamM+2X6z6QqJE+sXxjnmjhPJ n8lg2S3crvZaJEA18r6hdmQ= X-Google-Smtp-Source: ABdhPJzVSb20ANiX5ll1dtz+ohx/dg2pFIMma9EI1qb7JOiShYgzwedgLxfHNBkhjGpmAJAGhoBZcA== X-Received: by 2002:a1c:62d6:: with SMTP id w205mr19602807wmb.154.1595834311854; Mon, 27 Jul 2020 00:18:31 -0700 (PDT) Received: from oberon.zico.biz ([83.222.187.186]) by smtp.gmail.com with ESMTPSA id j24sm12312162wrb.49.2020.07.27.00.18.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 00:18:31 -0700 (PDT) From: "Tzvetomir Stoyanov (VMware)" To: rostedt@goodmis.org Cc: linux-trace-devel@vger.kernel.org Subject: [PATCH 5/5] KernelShark: New libkshark API for loading all entries from given file Date: Mon, 27 Jul 2020 10:18:23 +0300 Message-Id: <20200727071823.169962-6-tz.stoyanov@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200727071823.169962-1-tz.stoyanov@gmail.com> References: <20200727071823.169962-1-tz.stoyanov@gmail.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 From: Tzvetomir (VMware) Stoyanov The existing API kshark_load_entries() loads data in a single stream. It cannot be used in case there are more than one streams in the same file. A new API is implemented: kshark_load_file_entries() which loads and merges entries in all sessions, related to given trace file. Signed-off-by: Tzvetomir (VMware) Stoyanov --- src/KsUtils.cpp | 4 ++-- src/libkshark.c | 36 +++++++++++++++++++++++++++++++----- src/libkshark.h | 3 +++ 3 files changed, 36 insertions(+), 7 deletions(-) diff --git a/src/KsUtils.cpp b/src/KsUtils.cpp index bcb88b5..f3e93ad 100644 --- a/src/KsUtils.cpp +++ b/src/KsUtils.cpp @@ -501,7 +501,7 @@ int KsDataStore::loadDataFile(const QString &file, kshark_handle_dpi(stream, plugin, KSHARK_PLUGIN_INIT); } - n = kshark_load_entries(kshark_ctx, sd, &_rows); + n = kshark_load_file_entries(kshark_ctx, &_rows, file.toStdString().c_str()); if (n < 0) { kshark_close(kshark_ctx, sd); return n; @@ -541,7 +541,7 @@ int KsDataStore::appendDataFile(const QString &file, int64_t offset) *(kshark_ctx->stream[sd]->calib_array) = offset; kshark_ctx->stream[sd]->calib_array_size = 1; - nApnd = kshark_load_entries(kshark_ctx, sd, &apndRows); + nApnd = kshark_load_file_entries(kshark_ctx, &_rows, file.toStdString().c_str()); if (nApnd <= 0) { QErrorMessage *em = new QErrorMessage(); em->showMessage(QString("File %1 contains no data.").arg(file)); diff --git a/src/libkshark.c b/src/libkshark.c index 375874d..a5126fd 100644 --- a/src/libkshark.c +++ b/src/libkshark.c @@ -1331,7 +1331,7 @@ void kshark_set_clock_offset(struct kshark_context *kshark_ctx, } /** - * @brief Load the content of the all opened data file into an array of + * @brief Load the content of data from given file into an array of * kshark_entries. * If one or more filters are set, the "visible" fields of each entry * is updated according to the criteria provided by the filters. The @@ -1346,11 +1346,12 @@ void kshark_set_clock_offset(struct kshark_context *kshark_ctx, * @returns The size of the outputted data in the case of success, or a * negative error code on failure. */ -ssize_t kshark_load_all_entries(struct kshark_context *kshark_ctx, - struct kshark_entry ***data_rows) +ssize_t kshark_load_file_entries(struct kshark_context *kshark_ctx, + struct kshark_entry ***data_rows, const char *file) { size_t data_size = 0; int i, *stream_ids, sd; + struct kshark_data_stream *stream; if (!kshark_ctx->n_streams) return data_size; @@ -1359,16 +1360,18 @@ ssize_t kshark_load_all_entries(struct kshark_context *kshark_ctx, sd = stream_ids[0]; data_size = kshark_load_entries(kshark_ctx, sd, data_rows); - for (i = 1; i < kshark_ctx->n_streams; ++i) { struct kshark_entry **stream_data_rows = NULL; struct kshark_entry **merged_data_rows; size_t stream_data_size; sd = stream_ids[i]; + stream = kshark_get_data_stream(kshark_ctx, sd); + if (!stream || (file && strcmp(stream->file, file))) + continue; + stream_data_size = kshark_load_entries(kshark_ctx, sd, &stream_data_rows); - merged_data_rows = kshark_data_merge(*data_rows, data_size, stream_data_rows, stream_data_size); @@ -1387,6 +1390,29 @@ ssize_t kshark_load_all_entries(struct kshark_context *kshark_ctx, return data_size; } + +/** + * @brief Load the content of the all opened data file into an array of + * kshark_entries. + * If one or more filters are set, the "visible" fields of each entry + * is updated according to the criteria provided by the filters. The + * field "filter_mask" of the session's context is used to control the + * level of visibility/invisibility of the filtered entries. + * + * @param kshark_ctx: Input location for context pointer. + * @param data_rows: Output location for the trace data. The user is + * responsible for freeing the elements of the outputted + * array. + * + * @returns The size of the outputted data in the case of success, or a + * negative error code on failure. + */ +ssize_t kshark_load_all_entries(struct kshark_context *kshark_ctx, + struct kshark_entry ***data_rows) +{ + return kshark_load_file_entries(kshark_ctx, data_rows, NULL); +} + static inline void free_ptr(void *ptr) { if (ptr) diff --git a/src/libkshark.h b/src/libkshark.h index 44bec79..a76ec92 100644 --- a/src/libkshark.h +++ b/src/libkshark.h @@ -751,6 +751,9 @@ void kshark_set_clock_offset(struct kshark_context *kshark_ctx, ssize_t kshark_load_all_entries(struct kshark_context *kshark_ctx, struct kshark_entry ***data_rows); +ssize_t kshark_load_file_entries(struct kshark_context *kshark_ctx, + struct kshark_entry ***data_rows, const char *file); + /** * Data collections are used to optimize the search for an entry having an * abstract property, defined by a Matching condition function and an array of