From patchwork Mon May 17 14:21:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yordan Karadzhov X-Patchwork-Id: 12262241 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 D20DCC43462 for ; Mon, 17 May 2021 14:59:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AEF34601FC for ; Mon, 17 May 2021 14:59:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239741AbhEQPAP (ORCPT ); Mon, 17 May 2021 11:00:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240065AbhEQO6D (ORCPT ); Mon, 17 May 2021 10:58:03 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBB9DC06123A for ; Mon, 17 May 2021 07:21:51 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id k14so5992443eji.2 for ; Mon, 17 May 2021 07:21:51 -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=KztrVVn3EIMYdDMvJzGCzItRMyVQFSqBgkxfy+ofgeU=; b=Cg0HLzf7CXwTfspFtu+a3UBD8mt4peltm7aNxermSHpBsgx00ShOXHHPWXIhPBTDBv RzMGXlepYGdiXOQIsQ7kFf8o/Yug6dxJiHZSKTBHS+aDOsvDelH8zNalOqbvIcfit2rM kNEH1OfycKZrMP0JzULw4FVU5WwetnlAs0GY7vxULCeI0kCRVXiyEy/agJwMyH7gWyQ6 sPoBI17yohECkYCp3VbJh3PUmiEKEn4z5T//kaRZTLTQi1DIWP4Wop7QyjjQ3pleYcdF 3T2vY0jpccZCNlGqVOrzpPn3f/8aoavPDSePCmitco2Onn27hM4SMVL6a/SIf2Rs88JI hSXA== 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=KztrVVn3EIMYdDMvJzGCzItRMyVQFSqBgkxfy+ofgeU=; b=X9y3ZdL0PjXz5hEFLHQh0wxnjlksEADYGZvkKDkQG73djVKd7j5xkV8DbMEp6JrCS4 GMR7D6TuvTYGtusi6OTEyPTQwBYoZrGjxBRbfJUv4EU7kiiQxcz5IFqasPH00MuxLQj4 VoTpHzWoS4JNrRQfBA0bEddvfs8h1BqrgGLwe1TgZZx9YOAwYuacIvvWUjOqJxQBcWz4 ugZ/Zn9SocGW6j4dCXv3lNV7dRLglVpQtb4aSsWPUWzBX7WV0i/3TTOpLHSPHVtXDbcy 0xO898Nkx317IduDuzkRcxgizyYpvItkOlOZos1+nmYTde2AWs5b0LP9nio91DcPWyJa Hw7A== X-Gm-Message-State: AOAM5304EEzoxtl7ZLh/eqYVHQQ4Ju+J1e28vJ5MjTPQzGtTA7hcgpLT 8X6nWXd+QgWuDTdpIalVwna7z96/foM= X-Google-Smtp-Source: ABdhPJwsC3+jeefnbX+Jnt2WsadOlWRX1jpi/yvrcVMX5b42z/iAtYOSucsutMULpX6TXvvUQbws1w== X-Received: by 2002:a17:907:62a7:: with SMTP id nd39mr165435ejc.502.1621261310112; Mon, 17 May 2021 07:21:50 -0700 (PDT) Received: from localhost.localdomain ([84.40.73.151]) by smtp.gmail.com with ESMTPSA id t2sm8484849edd.58.2021.05.17.07.21.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 07:21:49 -0700 (PDT) From: "Yordan Karadzhov (VMware)" To: linux-trace-devel@vger.kernel.org Cc: "Yordan Karadzhov (VMware)" Subject: [PATCH v2 1/7] kernel-shark: Preserve markers when appending data Date: Mon, 17 May 2021 17:21:34 +0300 Message-Id: <20210517142140.286153-2-y.karadz@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210517142140.286153-1-y.karadz@gmail.com> References: <20210517142140.286153-1-y.karadz@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org When an entry is selected in the KernelShark GUI (using marker A and marker B) we only keep track the index of this entry inside the array of entries loaded at the moment of selecting. However, then a data file is appended, the new entries are merged to this array and the array is sorted. As a result the index of the marker can/will point to completely different entry. Signed-off-by: Yordan Karadzhov (VMware) --- src/KsDualMarker.hpp | 6 ++++++ src/KsMainWindow.cpp | 24 ++++++++++++++++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/KsDualMarker.hpp b/src/KsDualMarker.hpp index 0dcaf93..39c0ce2 100644 --- a/src/KsDualMarker.hpp +++ b/src/KsDualMarker.hpp @@ -154,6 +154,12 @@ public: void updateLabels(); + /** Get the index inside the data array marker A points to. */ + ssize_t markerAPos() {return markerA()._isSet ? markerA()._pos : -1;} + + /** Get the index inside the data array marker B points to. */ + ssize_t markerBPos() {return markerB()._isSet ? markerB()._pos : -1;} + signals: /** * This signal is emitted when the Table View has to switch the color diff --git a/src/KsMainWindow.cpp b/src/KsMainWindow.cpp index d0a434a..fa893ce 100644 --- a/src/KsMainWindow.cpp +++ b/src/KsMainWindow.cpp @@ -571,8 +571,15 @@ void KsMainWindow::markEntry(ssize_t row, DualMarkerState st) /** Select given kshark_entry with a given maker. */ void KsMainWindow::markEntry(const kshark_entry *e, DualMarkerState st) { - ssize_t row = kshark_find_entry_by_time(e->ts, _data.rows(), - 0, _data.size() - 1); + ssize_t row; + + if (!e) { + _mState.getMarker(st).reset(); + return; + } + + row = kshark_find_entry_by_time(e->ts, _data.rows(), + 0, _data.size() - 1); markEntry(row, st); } @@ -1341,7 +1348,20 @@ void KsMainWindow::loadDataFile(const QString& fileName) /** Append trace data for file. */ void KsMainWindow::appendDataFile(const QString& fileName) { + kshark_entry *eMarkA(nullptr), *eMarkB(nullptr); + int rowA = _mState.markerAPos(); + int rowB = _mState.markerBPos(); + + if (rowA >= 0) + eMarkA = _data.rows()[rowA]; + + if (rowB >= 0) + eMarkB = _data.rows()[rowB]; + _load(fileName, true); + + markEntry(eMarkA, DualMarkerState::A); + markEntry(eMarkB, DualMarkerState::B); } void KsMainWindow::_error(const QString &mesg, From patchwork Mon May 17 14:21:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yordan Karadzhov X-Patchwork-Id: 12262247 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 56742C43616 for ; Mon, 17 May 2021 14:59:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 24C2C601FC for ; Mon, 17 May 2021 14:59:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239913AbhEQPAS (ORCPT ); Mon, 17 May 2021 11:00:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241085AbhEQO6E (ORCPT ); Mon, 17 May 2021 10:58:04 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E4F4C08E867 for ; Mon, 17 May 2021 07:21:52 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id i13so7115603edb.9 for ; Mon, 17 May 2021 07:21:52 -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=tWHaLh8Y1OoaJH08nDsN3cdWdbiB3d7cAvX8lo3wDXc=; b=dmE5niiEiYv1LDZVw37GZFCwuNXFlINDTGPJ3zaDxWzjeiD/Rin8zrjD3EcTCi0Enk Ga3mnEOhWiYfhRqzpynory8VGLd0r+/U5tDEnpR4HgJ9YUmOV/WXVlyYb8hrRm9VGchy ke4zECLvKKXbOzStfXYljBAqcruL+T0fTyc+44T5JB9CGaQk8C9N+6pAFmuDzNX1qab+ LTu82E84AYa7MH4vMUAMzYqNiEHg4e+bcPuSHOSmJRaKGDeq34j/I5iKhpvHq7+idrQA sYkAfLpIjlYOOZgTGwxOn+Ejqvp/Ac3XCirJKWwddjoPVnEdiKFHEz4uefsR1/fqjoK4 visg== 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=tWHaLh8Y1OoaJH08nDsN3cdWdbiB3d7cAvX8lo3wDXc=; b=piiAiPtTtjxxZrJLM6Z8Tj0dbb3+VPglbKoIgvYLj3nhmeTRkkHtmD+M3U/5rauZX4 x4sgIFzw6zED9FJhuhuXyZHeKE1RiUVUIIVFRE9iisKdPD3rnQIXn30d3ZFECxn0unbp tR31V/zI5IT/cHdiXoL1l1bOmCvlzSeMpZu87K7W3GtNzLWLMzTprKNd/xzWtmtp1XGd TQqvOVXsJ9MXNuqwJJ6cCyAvs8f2XLobieWJcPj+Whn8NSEDmkQXE82rUUHde5giP7+7 yzDZKqSj6SJJRTQIliwHajhbKokEM/69did9BGb11WAqTopXsDWzLtQVkEuTDXQmPWm2 eliQ== X-Gm-Message-State: AOAM530hTQ73ETuDah4VvTufFKIC7BTV+Dkk8+zfXvEzrgEFbsL0ahVH VUzgIwWA7C5WZEg30GyQ/2BTZ4zjjPU= X-Google-Smtp-Source: ABdhPJwRb3RARyd6GWZjXFemiQQa9h++0ISYfnV4O+fDrinYt3cgcik92uT5gL92gVUE0a57Q5kvPA== X-Received: by 2002:aa7:d7d5:: with SMTP id e21mr355787eds.78.1621261311081; Mon, 17 May 2021 07:21:51 -0700 (PDT) Received: from localhost.localdomain ([84.40.73.151]) by smtp.gmail.com with ESMTPSA id t2sm8484849edd.58.2021.05.17.07.21.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 07:21:50 -0700 (PDT) From: "Yordan Karadzhov (VMware)" To: linux-trace-devel@vger.kernel.org Cc: "Yordan Karadzhov (VMware)" Subject: [PATCH v2 2/7] kernel-shark: Preserve open graphs when appending data Date: Mon, 17 May 2021 17:21:35 +0300 Message-Id: <20210517142140.286153-3-y.karadz@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210517142140.286153-1-y.karadz@gmail.com> References: <20210517142140.286153-1-y.karadz@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org If the user has already made some selection of graphs to be displayed by the GUI, those particular graphs are likely to be important for him, so it is better to keep this configuration after the data file is appended. The opposite can be annoying for the user. Signed-off-by: Yordan Karadzhov (VMware) --- src/KsGLWidget.cpp | 40 ++++++++++++++++++++++++++-------------- src/KsGLWidget.hpp | 4 +++- src/KsMainWindow.cpp | 10 +++++++--- src/KsTraceGraph.cpp | 10 +++++++--- src/KsTraceGraph.hpp | 2 +- src/KsUtils.cpp | 1 + 6 files changed, 45 insertions(+), 22 deletions(-) diff --git a/src/KsGLWidget.cpp b/src/KsGLWidget.cpp index 9f8e43b..8aab7b3 100644 --- a/src/KsGLWidget.cpp +++ b/src/KsGLWidget.cpp @@ -409,25 +409,12 @@ void KsGLWidget::keyReleaseEvent(QKeyEvent *event) */ #define KS_MAX_START_PLOTS 16 -/** - * @brief Load and show trace data. - * - * @param data: Input location for the KsDataStore object. - * KsDataStore::loadDataFile() must be called first. - */ -void KsGLWidget::loadData(KsDataStore *data) +void KsGLWidget::_defaultPlots(kshark_context *kshark_ctx) { - kshark_context *kshark_ctx(nullptr); QVector streamIds, plotVec; uint64_t tMin, tMax; int nCPUs, nBins; - if (!kshark_instance(&kshark_ctx) || !kshark_ctx->n_streams) - return; - - loadColors(); - - _data = data; _model.reset(); _streamPlots.clear(); @@ -463,6 +450,31 @@ void KsGLWidget::loadData(KsDataStore *data) tMin = _data->rows()[0]->ts; tMax = _data->rows()[_data->size() - 1]->ts; ksmodel_set_bining(_model.histo(), nBins, tMin, tMax); +} + +/** + * @brief Load and show trace data. + * + * @param data: Input location for the KsDataStore object. + * KsDataStore::loadDataFile() must be called first. + * @param resetPlots: If true, all existing graphs are closed + * and a default configuration of graphs is displayed + * (all CPU plots). If false, the current set of graphs + * is preserved. + */ +void KsGLWidget::loadData(KsDataStore *data, bool resetPlots) +{ + kshark_context *kshark_ctx(nullptr); + + if (!kshark_instance(&kshark_ctx) || !kshark_ctx->n_streams) + return; + + loadColors(); + + _data = data; + if (resetPlots) + _defaultPlots(kshark_ctx); + _model.fill(_data); } diff --git a/src/KsGLWidget.hpp b/src/KsGLWidget.hpp index 629ae37..6a72a35 100644 --- a/src/KsGLWidget.hpp +++ b/src/KsGLWidget.hpp @@ -101,7 +101,7 @@ public: void keyReleaseEvent(QKeyEvent *event); - void loadData(KsDataStore *data); + void loadData(KsDataStore *data, bool resetPlots); void loadColors(); @@ -326,6 +326,8 @@ private: int _getLastCPU(struct kshark_trace_histo *histo, int bin, int sd, int pid); + void _defaultPlots(kshark_context *kshark_ctx); + void _deselect(); int _bin0Offset() {return _labelSize + 2 * _hMargin;} diff --git a/src/KsMainWindow.cpp b/src/KsMainWindow.cpp index fa893ce..da1c0af 100644 --- a/src/KsMainWindow.cpp +++ b/src/KsMainWindow.cpp @@ -1283,7 +1283,8 @@ void KsMainWindow::_load(const QString& fileName, bool append) QApplication::processEvents(); _view.reset(); - _graph.reset(); + if (!append) + _graph.reset(); auto lamLoadJob = [&, this] () { QVector v; @@ -1333,7 +1334,10 @@ void KsMainWindow::_load(const QString& fileName, bool append) _view.loadData(&_data); pb.setValue(175); - _graph.loadData(&_data); + _graph.loadData(&_data, !append); + if (append) + _graph.cpuReDraw(sd, KsUtils::getCPUList(sd)); + pb.setValue(195); } @@ -1454,7 +1458,7 @@ void KsMainWindow::loadSession(const QString &fileName) _view.loadData(&_data); pb.setValue(155); - _graph.loadData(&_data); + _graph.loadData(&_data, true); _filterSyncCBoxUpdate(kshark_ctx); pb.setValue(175); diff --git a/src/KsTraceGraph.cpp b/src/KsTraceGraph.cpp index 1e976df..65e5a79 100644 --- a/src/KsTraceGraph.cpp +++ b/src/KsTraceGraph.cpp @@ -148,12 +148,16 @@ KsTraceGraph::KsTraceGraph(QWidget *parent) * @brief Load and show trace data. * * @param data: Input location for the KsDataStore object. - * KsDataStore::loadDataFile() must be called first. + * KsDataStore::loadDataFile() must be called first. + * @param resetPlots: If true, all existing graphs are closed + * and a default configuration of graphs is displayed + * (all CPU plots). If false, the current set of graphs + * is preserved. */ -void KsTraceGraph::loadData(KsDataStore *data) +void KsTraceGraph::loadData(KsDataStore *data, bool resetPlots) { _data = data; - _glWindow.loadData(data); + _glWindow.loadData(data, resetPlots); updateGeom(); } diff --git a/src/KsTraceGraph.hpp b/src/KsTraceGraph.hpp index 6e83f21..b1132e0 100644 --- a/src/KsTraceGraph.hpp +++ b/src/KsTraceGraph.hpp @@ -45,7 +45,7 @@ class KsTraceGraph : public KsWidgetsLib::KsDataWidget public: explicit KsTraceGraph(QWidget *parent = nullptr); - void loadData(KsDataStore *data); + void loadData(KsDataStore *data, bool resetPlots); void setMarkerSM(KsDualMarkerSM *m); diff --git a/src/KsUtils.cpp b/src/KsUtils.cpp index ec53267..757f49c 100644 --- a/src/KsUtils.cpp +++ b/src/KsUtils.cpp @@ -785,6 +785,7 @@ int KsDataStore::appendDataFile(const QString &file, int64_t offset) _rows = mergedRows; registerCPUCollections(); + emit updateWidgets(this); return sd; } From patchwork Mon May 17 14:21:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yordan Karadzhov X-Patchwork-Id: 12262243 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 22D00C43460 for ; Mon, 17 May 2021 14:59:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F26546108D for ; Mon, 17 May 2021 14:59:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239873AbhEQPAR (ORCPT ); Mon, 17 May 2021 11:00:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239913AbhEQO6E (ORCPT ); Mon, 17 May 2021 10:58:04 -0400 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F0BCC08E876 for ; Mon, 17 May 2021 07:21:53 -0700 (PDT) Received: by mail-ej1-x629.google.com with SMTP id et19so2417358ejc.4 for ; Mon, 17 May 2021 07:21:53 -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=H8H19MfKEzKlMMeMpUQNLaugzc0L7lI2BG6f2PIOKyc=; b=h8Pfy7aOuixW/K/T3I+eWP3CaQDm76UjZP4xmvCN5UdeukQWx9k0zzHjiIiZFUA8+b pX+9piRS3fBQQ8TeG2CHal43A9wZ7nBPL8WZad5bxF2nYIsdcjTtzPr3BhOqmifW0XvX Pv9Q67fZ50q9ARmeHUOrItga3I7lHllp7oSfgvVOmhb5ZrD2hemr+d+hViC1BTk20TR3 8vX3f0Z6jAv+lp8rYWn01g/RJJrHK1PFLVtEf/W+CjI8slGlXamXFjwsBVtT1P6A9BbD IVoJ/nLheYA6G+4+0Yx29KdEQ4AyMjI3Zqs82EboOBo5u9SLfHqbOJR9tKOJ2lKpjLRA XZ6g== 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=H8H19MfKEzKlMMeMpUQNLaugzc0L7lI2BG6f2PIOKyc=; b=cVjtg21rO2+0wM17axbFIjL3uT4c6XY6Kr47kqddtOHtRwlBu19CaCFDwLdIBCGFbF A+BuWGa9CgLKMNxYZnxaYDN0q5Q7sM6Nyr/GtWeEWElkx/RadcrR4MB1rrczTvYQbb+Y RVX1orO3X3NY5wQa68W/BJpf7t4l3Helx3cOVd4th1MM15oaV4Pj30KqXKzUZeNmOKlK wKf3vE084oX1LKKqOIBXdfCvNCxHfxSNwLNOjSheiRiiVxD/9lqyysMyK8xYUU6LuPT4 M8wo9g3WKdztjrCyJFewDZ0XnNFwjaoY2A21IgRSzJD+khk9kRxMjtenvWBKHnrC9/D2 1zbg== X-Gm-Message-State: AOAM5330jQX/+CGz2/5u3fBKz+tIyeDHJV8IT1GdnByuJxsxklutvnIr TzVHN6KXuVqDJ4Vzg5Uw1dZYlWkEyEE= X-Google-Smtp-Source: ABdhPJxo4bBpofEtt6yklQSlgOvZU9UXdZpjUYFcQQa7qaIlRyqsHBsjHnWUvH6K+FvtON4hEjgGcQ== X-Received: by 2002:a17:906:8591:: with SMTP id v17mr173662ejx.378.1621261311927; Mon, 17 May 2021 07:21:51 -0700 (PDT) Received: from localhost.localdomain ([84.40.73.151]) by smtp.gmail.com with ESMTPSA id t2sm8484849edd.58.2021.05.17.07.21.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 07:21:51 -0700 (PDT) From: "Yordan Karadzhov (VMware)" To: linux-trace-devel@vger.kernel.org Cc: "Yordan Karadzhov (VMware)" Subject: [PATCH v2 3/7] kernel-shark: Clear before loading new session Date: Mon, 17 May 2021 17:21:36 +0300 Message-Id: <20210517142140.286153-4-y.karadz@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210517142140.286153-1-y.karadz@gmail.com> References: <20210517142140.286153-1-y.karadz@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org Make sure that all already loaded Data streams are properly closed, before loading a new configuration from session description file. Signed-off-by: Yordan Karadzhov (VMware) --- src/KsSession.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/KsSession.cpp b/src/KsSession.cpp index 1e19a5f..b9edb3a 100644 --- a/src/KsSession.cpp +++ b/src/KsSession.cpp @@ -128,6 +128,7 @@ void KsSession::loadDataStreams(kshark_context *kshark_ctx, data->unregisterCPUCollections(); + kshark_close_all(kshark_ctx); dataSize = kshark_import_all_dstreams(kshark_ctx, _config, data->rows_r()); From patchwork Mon May 17 14:21:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yordan Karadzhov X-Patchwork-Id: 12262245 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 94919C4363F for ; Mon, 17 May 2021 14:59:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 77B4960E0C for ; Mon, 17 May 2021 14:59:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240292AbhEQPAT (ORCPT ); Mon, 17 May 2021 11:00:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241238AbhEQO6H (ORCPT ); Mon, 17 May 2021 10:58:07 -0400 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2646C08E886 for ; Mon, 17 May 2021 07:21:53 -0700 (PDT) Received: by mail-ed1-x530.google.com with SMTP id i13so7115694edb.9 for ; Mon, 17 May 2021 07:21:53 -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=pxEhxlhjqSNlLDjkxyRGJ+PZ8OO1QwbqKOC2GyErYZQ=; b=op3Q9ffeD6F6IOl9LSBeDHJy6Vw+BO/P3nOZcro9OCNcpnjrS+Z/hrCTurS3U/S216 xaqs12k0C1R74d/4eVgkSpsI8I/Kxn+SHsbjxu0lWUk5v2Iz6R8bwmL1oWsYJ3AOAZSp jEqBWrvgeva5BpwVeMC7fIvv7sR/uOeQ6UPnnousTV5PwlUT92HOTNTm+iL5wD1aTOWi QyW2h76XdHpzsz+3lokp0Mp/4Ga8gMWi60chKdTgBS2LUvNEhZBZ473/q7ZCWwTMLjwX lKH5HWOdlJcsCKY6SuuPFX1qtFHHOjZjn8vAtoFuDKVJVDA9ZOXfIFExwIdS5qJ4YA/E qZlA== 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=pxEhxlhjqSNlLDjkxyRGJ+PZ8OO1QwbqKOC2GyErYZQ=; b=TPBBhS4Ynzp+v/xJ6ew2hCllw81afWxtcR2YGZc0C+LSyE3N87fo6nfeG975T0wTkX 3ynThmX3G+23gwlERlpCKx+7gKjSfBjjluQffMdta8Pbb485HtyOkqPEy5bbFYPm5uYg F33YP0OmA0/KIuWLJgQoQxasV75xT15LRtqyPCHL9tksQMeFyZURJtWA+8vz6nQJDgTW pS4krziSvz+f35Blk/D0TiIFkc6pe5CCXKTg6tU04REYTnTxZgZi//e52iDGwUbNH5TN xeCT+C5WLYFtGtcQPhufa0I0W7HMq66YY24d417dkNGrksDZDueX829p9GBxKov8KPvT PqeA== X-Gm-Message-State: AOAM5326KLIbfvMIV5052Igup5efqLMWtqc1U/EAlKNGuXj2N0wTa4if AW8a7DYTh2spfSB3ZUmvVv3mfZ+Hzi8= X-Google-Smtp-Source: ABdhPJxbAoJNQmEqvRnM75Ji8TsF79w34C73EdIj9AFdhAXBaI1JuO2r8uhDicwTJtRF78LWfWOzTA== X-Received: by 2002:a50:d54c:: with SMTP id f12mr269943edj.301.1621261312610; Mon, 17 May 2021 07:21:52 -0700 (PDT) Received: from localhost.localdomain ([84.40.73.151]) by smtp.gmail.com with ESMTPSA id t2sm8484849edd.58.2021.05.17.07.21.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 07:21:52 -0700 (PDT) From: "Yordan Karadzhov (VMware)" To: linux-trace-devel@vger.kernel.org Cc: "Yordan Karadzhov (VMware)" Subject: [PATCH v2 4/7] kernel-shark: Better handling of plugins when appending data file Date: Mon, 17 May 2021 17:21:37 +0300 Message-Id: <20210517142140.286153-5-y.karadz@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210517142140.286153-1-y.karadz@gmail.com> References: <20210517142140.286153-1-y.karadz@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org It may sound like a good idea to reinitialize all plugins for all existing Data streams after a new stream is appended, but it isn't. Such reset will re-initialize all Data containers open by the plugins, hence it requires to do a complete reload of all previously loaded data. Currently we reset the plugins but do not reload the data, which is a bug. Because, reloading the data can be slow on large data sets, I prefer to fix the bug, by eliminating the reload of the plugins. Signed-off-by: Yordan Karadzhov (VMware) --- src/KsUtils.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/KsUtils.cpp b/src/KsUtils.cpp index 757f49c..3db8951 100644 --- a/src/KsUtils.cpp +++ b/src/KsUtils.cpp @@ -677,8 +677,7 @@ int KsDataStore::_openDataFile(kshark_context *kshark_ctx, if (kshark_is_tep(kshark_ctx->stream[sd])) { kshark_tep_init_all_buffers(kshark_ctx, sd); - for (int i = 0; i < kshark_ctx->n_streams; ++i) - kshark_tep_handle_plugins(kshark_ctx, i); + kshark_tep_handle_plugins(kshark_ctx, sd); } return sd; From patchwork Mon May 17 14:21:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yordan Karadzhov X-Patchwork-Id: 12262253 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 C8C76C433ED for ; Mon, 17 May 2021 14:59:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AE5CF601FC for ; Mon, 17 May 2021 14:59:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241693AbhEQPBL (ORCPT ); Mon, 17 May 2021 11:01:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238227AbhEQO6v (ORCPT ); Mon, 17 May 2021 10:58:51 -0400 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1066C08E899 for ; Mon, 17 May 2021 07:21:54 -0700 (PDT) Received: by mail-ed1-x529.google.com with SMTP id di13so7144229edb.2 for ; Mon, 17 May 2021 07:21:54 -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=pIzHPXqbiAaEKSLBqogK8Sd1h6M0//+4RUcFlBIV+uU=; b=AGxOd8E4piy5GpD1Mp2wz32ZgX+9edvoNCWQEOe6rLpOdHYBftWbWyriVxYPQdNm4D O6l4kVgn3o+110RMSuwCBN6ip5+cQ+2LazPU/C7jvOwRqfws/Nz3STM/TkX/0fi3yFeN qn74mKP843QiEJ16e7qE1EPkI/Q3Ch4KKDJ/Fna1y5/pjggetiuwb+PKArSDCPb744Lq Mxovl3oSwE0SCFIMRArx3hFv7OhcoyRQoNyPcuYG3fr/26QVQM0HIMzwB4LKPaLvSqlW oWoPjQEIc4YjoJG5ucX0OUW/4ko5xkutZ401ujCSRZBUcUW8Etlw5VlPUEUCOF3k2hPG dGbw== 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=pIzHPXqbiAaEKSLBqogK8Sd1h6M0//+4RUcFlBIV+uU=; b=LKBzbTdjUXGJYc+br50ZxDoPo2bdNfUDybzcv8OS+L1W9VAiXS2pK/1CtE5iz4QvR8 Jhy0e+oQTGZDM85Y+Nu242UlEKIH+gz+6kSQsLafHlIK0cewV1+PxckJExTGFIn5xYjf f8mj3+xvrpJwiRpfeCumoqPiXv50KsrSFZjeGpGmyGFVSNDJxaC5bSdPyjX13Xkv7Cn5 LkLv8YQ4+WTS2nZTCdlLDba1Uie3DcQUCXhwSj2pYHxfdNtFZ/PfMMW/IfICV+qDbt/y hdwrDyzmalkJozvtRW403M+LCU908vcYzOZc6Q0azxaqOQZNBB/bgIZHKIrQPw0mjurg xBDA== X-Gm-Message-State: AOAM532kEQug1QN4cMzne9wnnMFeuXS63XLm8N6uZjgfWUYdZgoc2iTD +jlqvb/RGUZurgca7SO2QkcBwMSoGOY= X-Google-Smtp-Source: ABdhPJyTcxu2xMV0TjEbiRJQhsRA6un1Qk4Q7SmyXL9Iiuwi95mVi/9gOwa6q1ap28k4gXdx2Yrd6w== X-Received: by 2002:a05:6402:354b:: with SMTP id f11mr306665edd.139.1621261313232; Mon, 17 May 2021 07:21:53 -0700 (PDT) Received: from localhost.localdomain ([84.40.73.151]) by smtp.gmail.com with ESMTPSA id t2sm8484849edd.58.2021.05.17.07.21.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 07:21:52 -0700 (PDT) From: "Yordan Karadzhov (VMware)" To: linux-trace-devel@vger.kernel.org Cc: "Yordan Karadzhov (VMware)" Subject: [PATCH v2 5/7] kernel-shark: Do draw the combo point of the mark Date: Mon, 17 May 2021 17:21:38 +0300 Message-Id: <20210517142140.286153-6-y.karadz@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210517142140.286153-1-y.karadz@gmail.com> References: <20210517142140.286153-1-y.karadz@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org The lines of the code that initialize and plot the combo point are missing in the original commit. Fixing: fc14e40 (kernel-shark: Add combo point to Mark) Signed-off-by: Yordan Karadzhov (VMware) --- src/KsPlotTools.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/KsPlotTools.cpp b/src/KsPlotTools.cpp index abef5f8..1d63a9b 100644 --- a/src/KsPlotTools.cpp +++ b/src/KsPlotTools.cpp @@ -680,6 +680,8 @@ Mark::Mark() _cpu._size = 5.5f; _task._color = Color(0, 255, 0); _task._size = 5.5f; + _combo._color = Color(100, 150, 255); + _combo._size = 5.5f; } void Mark::_draw(const Color &col, float size) const @@ -691,6 +693,7 @@ void Mark::_draw(const Color &col, float size) const _cpu.draw(); _task.draw(); + _combo.draw(); } /** From patchwork Mon May 17 14:21:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yordan Karadzhov X-Patchwork-Id: 12262249 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 1565BC43462 for ; Mon, 17 May 2021 14:59:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E4523610A1 for ; Mon, 17 May 2021 14:59:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240275AbhEQPBI (ORCPT ); Mon, 17 May 2021 11:01:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240968AbhEQO7H (ORCPT ); Mon, 17 May 2021 10:59:07 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A8A3C08E89A for ; Mon, 17 May 2021 07:21:55 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id u21so9413436ejo.13 for ; Mon, 17 May 2021 07:21:55 -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=ULNvnvi4EPBXgjFJ6GGT87XhDpqkwwO0rwMfrOQc7vY=; b=OUejYcEN7taegVIJhAUXqfiC6yABQ2MVKvh1DHYV97PKqTgerKdvAD+24bVGjFXwbR orDyRwPHug+eYFgGd1WgcPM5irExf4eZwZOqzcwlvNg70ZsVleJBJ3tzLD5zAd68ignd Zb54ykMiJKwZDVwUx1gjA0HZOkt/ImgbSpL9v7uFgBxqddcY9vRWLzb4s3aOOvHISAlq dznObutAAsCqgtSNytPBgOtXnGXwOv79g7EOasvSRs4FPJ9doNhn3wEZtnh3Xj5m9iTc G04F3jF86PwtudKZAO+9HWXlf6FP2u2WFzDiyhikBDtN1dHh24TdOPJkpumpmHSiz+BC 6nYw== 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=ULNvnvi4EPBXgjFJ6GGT87XhDpqkwwO0rwMfrOQc7vY=; b=Evm0vzwwsXI+8qCv/wNIuLQfJil397k7tBhQWI6GvnsSx43hgHNQ+t4AL8o7UQszjS ar/MVQ+IZXj6UpI3b3r/hFbuNOnd2qquxlsGXszWFhn7a3IOFVPdT5UPYeQfZyqOmH/d NQGVIBwvQ1RiVbr+xtYxjJ6ratWnQh2+UHOd7gJJ8rP43690lb9vf/Xl2QvSo4gkFbl+ aRCwBfwqVlEmvNZQQLcUEXhtnfDSnKybbWKohLbXmyq9p9ZDgYcXSOdKQwFdYI3/xsvH YI17s+siUHKGjbGou+kxInXR9S0brmNHpCZOrZJhItPdDv4trU2kfDUyN09GWLTpl7oE WlFA== X-Gm-Message-State: AOAM531ByYYwwcjgLCgLkY91ufu4FqrwDB0Bb5ak0qSTHIaBpQq3Au1Q DVmwxSGQMPIaSgIqafQLSOupoF6jdjI= X-Google-Smtp-Source: ABdhPJw44bgDBGqd9WUBWz/MPdGYQhkgGYM+nc8OvdgHRQufA4D8leqqx6fjkEH8z1JPNkp+FwwCVQ== X-Received: by 2002:a17:907:3f16:: with SMTP id hq22mr190760ejc.20.1621261313902; Mon, 17 May 2021 07:21:53 -0700 (PDT) Received: from localhost.localdomain ([84.40.73.151]) by smtp.gmail.com with ESMTPSA id t2sm8484849edd.58.2021.05.17.07.21.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 07:21:53 -0700 (PDT) From: "Yordan Karadzhov (VMware)" To: linux-trace-devel@vger.kernel.org Cc: "Yordan Karadzhov (VMware)" Subject: [PATCH v2 6/7] kernel-shark: Fix the checking if "trace_seq" was destroyed Date: Mon, 17 May 2021 17:21:39 +0300 Message-Id: <20210517142140.286153-7-y.karadz@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210517142140.286153-1-y.karadz@gmail.com> References: <20210517142140.286153-1-y.karadz@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org When closing a "tep" data stream we destroy the "trace_seq" object. However, trace_seq_destroy() sets the buffer to "TRACE_SEQ_POISON" which is different from NULL. Because TRACE_SEQ_POISON is an internal definition of libtraceevent, we have to set the buffer to NULL in order to indicate that it was destroyed. Signed-off-by: Yordan Karadzhov (VMware) --- src/libkshark-tepdata.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libkshark-tepdata.c b/src/libkshark-tepdata.c index bc5babb..acc554b 100644 --- a/src/libkshark-tepdata.c +++ b/src/libkshark-tepdata.c @@ -1615,8 +1615,10 @@ int kshark_tep_close_interface(struct kshark_data_stream *stream) if (!tep_handle) return -EFAULT; - if (seq.buffer) + if (seq.buffer) { trace_seq_destroy(&seq); + seq.buffer = NULL; + } if (tep_handle->advanced_event_filter) { tep_filter_reset(tep_handle->advanced_event_filter); From patchwork Mon May 17 14:21:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yordan Karadzhov X-Patchwork-Id: 12262251 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 46360C43470 for ; Mon, 17 May 2021 14:59:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 26FFA60BBB for ; Mon, 17 May 2021 14:59:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241660AbhEQPBJ (ORCPT ); Mon, 17 May 2021 11:01:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241999AbhEQO7J (ORCPT ); Mon, 17 May 2021 10:59:09 -0400 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAA59C08E89D for ; Mon, 17 May 2021 07:21:55 -0700 (PDT) Received: by mail-ej1-x62b.google.com with SMTP id lz27so9455099ejb.11 for ; Mon, 17 May 2021 07:21:55 -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=rUP8dy+x6VbSfLOd5kMRkaXxDNtZoou4qX0mjGI5Yyg=; b=KoEekqleQnWxxEiDyNQvC+sa14FfBUTtrwQC82umOfkE7fS+g4REsxzbHBv/LgMgZW lPR7VQB1VF0BeJo3aG+ZStEHfEf0YGB9xLqKJdeAHGqh34Yo/DfzmRRpiHYT8f9yKnUl IJNuS7dy5d7y8omU9IxvzAsd4YaZIkvc1+WWVD13uOpZh1BMsW5o99SiAYjxuCHw3/4/ VV64U74e7wds9/RtiGqKf0hU9Nu81Hynn8tcF5WSKQUPpDbJyLrkARpqD3CUmSjlBAr/ 2+q0nLGE/Q6xV31P+X87GdlchYvc/UHL66SovrzP2IBlhahyfBDKXeIogB7ymGsDcjjq 4RNQ== 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=rUP8dy+x6VbSfLOd5kMRkaXxDNtZoou4qX0mjGI5Yyg=; b=jJjsrBwx9xeMxXObx8sei3drDtnhJNywFy1tVi7B9AhFDzEDbSRmFwy+8gatifRfRv sgCYoa3bwPlz4MLMYOwfUvsQO9MI/FTrLVNZ8qsct+qWzyrFXBKilI2lKIo09yNcBcq2 empBGpoDdY+cJ/3sIAgh8Hfyfa69NLsCtjaEkVl+QM5p4cuo8yKaP9EHft+WYVyHr/JM aVWX5oPTUPtsySpp6wMDmJvoRGGuqnuc71X3eGnGiddy4l1M8ubXRwiSqvkUlEOrwPXj KwAjeIMD6bgJssm6TMNjNInThgvp8Fk1VP4aZRc3YSYSNksdNqZ5wWPJcNebm3fTNo2a ZM3A== X-Gm-Message-State: AOAM5320E9jbGlv3kV/JuYjKPxC/JjeGiFWVQ2IKqlvugspwBlKI0IUq jucv0ND9jlrTt2qqvCwzIAYghqo8MMs= X-Google-Smtp-Source: ABdhPJy5j15qU8bnT4ZiO7M1ASDGW0XN0zpestWZXg+iLBBRPNgaROjJ5027zJCq3xJ40JvQF45PBg== X-Received: by 2002:a17:906:e0d5:: with SMTP id gl21mr157052ejb.93.1621261314570; Mon, 17 May 2021 07:21:54 -0700 (PDT) Received: from localhost.localdomain ([84.40.73.151]) by smtp.gmail.com with ESMTPSA id t2sm8484849edd.58.2021.05.17.07.21.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 07:21:54 -0700 (PDT) From: "Yordan Karadzhov (VMware)" To: linux-trace-devel@vger.kernel.org Cc: "Yordan Karadzhov (VMware)" Subject: [PATCH v2 7/7] kernel-shark: No slash at the end of KS_PLUGIN_INSTALL_PREFIX Date: Mon, 17 May 2021 17:21:40 +0300 Message-Id: <20210517142140.286153-8-y.karadz@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210517142140.286153-1-y.karadz@gmail.com> References: <20210517142140.286153-1-y.karadz@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org This trailing slash is redundant. Signed-off-by: Yordan Karadzhov (VMware) --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 94023a8..cef6f05 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,7 +111,7 @@ if (NOT CMAKE_CXX_FLAGS_PACKAGE) set(CMAKE_CXX_FLAGS_PACKAGE "-O3") endif (NOT CMAKE_CXX_FLAGS_PACKAGE) -set(KS_PLUGIN_INSTALL_PREFIX ${_LIBDIR}/${KS_APP_NAME}/plugins/) +set(KS_PLUGIN_INSTALL_PREFIX ${_LIBDIR}/${KS_APP_NAME}/plugins) set(KS_ICON KS_icon_shark.svg) set(KS_ICON_FIN KS_icon_fin.svg)