From patchwork Wed Aug 29 16:29:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yordan Karadzhov X-Patchwork-Id: 10759221 Return-Path: Received: from mail-wm0-f67.google.com ([74.125.82.67]:52150 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727324AbeH2U1Z (ORCPT ); Wed, 29 Aug 2018 16:27:25 -0400 Received: by mail-wm0-f67.google.com with SMTP id y2-v6so5908895wma.1 for ; Wed, 29 Aug 2018 09:29:43 -0700 (PDT) From: "Yordan Karadzhov (VMware)" To: rostedt@goodmis.org Cc: linux-trace-devel@vger.kernel.org, "Yordan Karadzhov (VMware)" Subject: [PATCH 1/4] kernel-shark-qt: Change "pevent_" to "tep_" in Doxygen. Date: Wed, 29 Aug 2018 19:29:24 +0300 Message-Id: <20180829162927.20200-1-y.karadz@gmail.com> Sender: linux-trace-devel-owner@vger.kernel.org List-ID: Content-Length: 1695 The naming convention has changed in the code already but we forgot to do this in the Doxygen documentation. Signed-off-by: Yordan Karadzhov (VMware) --- kernel-shark-qt/src/libkshark.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel-shark-qt/src/libkshark.c b/kernel-shark-qt/src/libkshark.c index d07bdd8..1b7e544 100644 --- a/kernel-shark-qt/src/libkshark.c +++ b/kernel-shark-qt/src/libkshark.c @@ -759,7 +759,7 @@ ssize_t kshark_load_data_entries(struct kshark_context *kshark_ctx, /** * @brief Load the content of the trace data file into an array of - * pevent_records. Use this function only if you need fast access + * tep_records. Use this function only if you need fast access * to all fields of the record. * * @param kshark_ctx: Input location for the session context pointer. @@ -962,14 +962,14 @@ ssize_t kshark_find_entry_by_time(uint64_t time, } /** - * @brief Binary search inside a time-sorted array of pevent_records. + * @brief Binary search inside a time-sorted array of tep_records. * * @param time: The value of time to search for. * @param data: Input location for the trace data. * @param l: Array index specifying the lower edge of the range to search in. * @param h: Array index specifying the upper edge of the range to search in. * - * @returns On success, the first pevent_record inside the range, having a + * @returns On success, the first tep_record inside the range, having a timestamp equal or bigger than "time". If all entries inside the range have timestamps greater than "time" the function returns BSEARCH_ALL_GREATER (negative value). From patchwork Wed Aug 29 16:29:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yordan Karadzhov X-Patchwork-Id: 10759223 Return-Path: Received: from mail-wr1-f65.google.com ([209.85.221.65]:46091 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727324AbeH2U1a (ORCPT ); Wed, 29 Aug 2018 16:27:30 -0400 Received: by mail-wr1-f65.google.com with SMTP id a108-v6so5392843wrc.13 for ; Wed, 29 Aug 2018 09:29:47 -0700 (PDT) From: "Yordan Karadzhov (VMware)" To: rostedt@goodmis.org Cc: linux-trace-devel@vger.kernel.org, "Yordan Karadzhov (VMware)" Subject: [PATCH 2/4] kernel-shark-qt: Restore the alignment in libkshark-configio.c Date: Wed, 29 Aug 2018 19:29:25 +0300 Message-Id: <20180829162927.20200-2-y.karadz@gmail.com> In-Reply-To: <20180829162927.20200-1-y.karadz@gmail.com> References: <20180829162927.20200-1-y.karadz@gmail.com> Sender: linux-trace-devel-owner@vger.kernel.org List-ID: Content-Length: 1459 The alignment of the function arguments has to be fixed after the naming convention changes. This version of the patch contains a number of improvements suggested by Steven Rostedt. Thanks Steven! Signed-off-by: Yordan Karadzhov (VMware) --- kernel-shark-qt/src/libkshark-configio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel-shark-qt/src/libkshark-configio.c b/kernel-shark-qt/src/libkshark-configio.c index 484da93..cdc8c76 100644 --- a/kernel-shark-qt/src/libkshark-configio.c +++ b/kernel-shark-qt/src/libkshark-configio.c @@ -1034,7 +1034,7 @@ static bool kshark_adv_filters_to_json(struct kshark_context *kshark_ctx, for (i = 0; events[i]; i++) { str = tep_filter_make_string(adv_filter, - events[i]->id); + events[i]->id); if (!str) continue; @@ -1137,7 +1137,7 @@ static bool kshark_adv_filters_from_json(struct kshark_context *kshark_ctx, json_object_get_string(jcond)); ret = tep_filter_add_filter_str(adv_filter, - filter_str); + filter_str); if (ret < 0) goto fail; } @@ -1149,7 +1149,7 @@ static bool kshark_adv_filters_from_json(struct kshark_context *kshark_ctx, char error_str[200]; int error_status = tep_strerror(kshark_ctx->pevent, ret, error_str, - sizeof(error_str)); + sizeof(error_str)); if (error_status == 0) fprintf(stderr, "filter failed due to: %s\n", error_str); From patchwork Wed Aug 29 16:29:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yordan Karadzhov X-Patchwork-Id: 10759225 Return-Path: Received: from mail-wr1-f66.google.com ([209.85.221.66]:32791 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727324AbeH2U1c (ORCPT ); Wed, 29 Aug 2018 16:27:32 -0400 Received: by mail-wr1-f66.google.com with SMTP id v90-v6so5433909wrc.0 for ; Wed, 29 Aug 2018 09:29:49 -0700 (PDT) From: "Yordan Karadzhov (VMware)" To: rostedt@goodmis.org Cc: linux-trace-devel@vger.kernel.org, "Yordan Karadzhov (VMware)" Subject: [PATCH 3/4] kernel-shark-qt: Remove TODO comment in kshark_load_data_entries() Date: Wed, 29 Aug 2018 19:29:26 +0300 Message-Id: <20180829162927.20200-3-y.karadz@gmail.com> In-Reply-To: <20180829162927.20200-1-y.karadz@gmail.com> References: <20180829162927.20200-1-y.karadz@gmail.com> Sender: linux-trace-devel-owner@vger.kernel.org List-ID: The problem described by the TODO message was fixed, but we forgot to remove the message itself. Signed-off-by: Yordan Karadzhov (VMware) --- kernel-shark-qt/src/libkshark.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/kernel-shark-qt/src/libkshark.c b/kernel-shark-qt/src/libkshark.c index 1b7e544..b4a76ae 100644 --- a/kernel-shark-qt/src/libkshark.c +++ b/kernel-shark-qt/src/libkshark.c @@ -712,13 +712,6 @@ ssize_t kshark_load_data_entries(struct kshark_context *kshark_ctx, if (*data_rows) free(*data_rows); - /* - * TODO: Getting the records separately slows this function - * down, instead of just accessing the records when - * setting up the kernel entries. But this keeps the - * code simplier. We should revisit to see if we can - * bring back the performance. - */ total = get_records(kshark_ctx, &rec_list, type); if (total < 0) goto fail; From patchwork Wed Aug 29 16:29:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yordan Karadzhov X-Patchwork-Id: 10759227 Return-Path: Received: from mail-wr1-f68.google.com ([209.85.221.68]:46095 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727324AbeH2U1d (ORCPT ); Wed, 29 Aug 2018 16:27:33 -0400 Received: by mail-wr1-f68.google.com with SMTP id a108-v6so5393009wrc.13 for ; Wed, 29 Aug 2018 09:29:51 -0700 (PDT) From: "Yordan Karadzhov (VMware)" To: rostedt@goodmis.org Cc: linux-trace-devel@vger.kernel.org, "Yordan Karadzhov (VMware)" Subject: [PATCH 4/4] kernel-shark-qt: Fix Doxygen doc. for libkshark-model.c Date: Wed, 29 Aug 2018 19:29:27 +0300 Message-Id: <20180829162927.20200-4-y.karadz@gmail.com> In-Reply-To: <20180829162927.20200-1-y.karadz@gmail.com> References: <20180829162927.20200-1-y.karadz@gmail.com> Sender: linux-trace-devel-owner@vger.kernel.org List-ID: Content-Length: 1039 This patch corrects some typos in the Doxygen documentation of libkshark-model.c Signed-off-by: Yordan Karadzhov (VMware) --- kernel-shark-qt/src/libkshark-model.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel-shark-qt/src/libkshark-model.c b/kernel-shark-qt/src/libkshark-model.c index 3138257..246a60c 100644 --- a/kernel-shark-qt/src/libkshark-model.c +++ b/kernel-shark-qt/src/libkshark-model.c @@ -5,7 +5,7 @@ */ /** - * @file libkshark.c + * @file libkshark-model.c * @brief Visualization model for FTRACE (trace-cmd) data. */ @@ -16,13 +16,13 @@ // KernelShark #include "libkshark-model.h" -/* The index of the Upper Overflow bin. */ +/** The index of the Upper Overflow bin. */ #define UOB(histo) (histo->n_bins) -/* The index of the Lower Overflow bin. */ +/** The index of the Lower Overflow bin. */ #define LOB(histo) (histo->n_bins + 1) -/* For all bins */ +/** For all bins. */ # define ALLB(histo) LOB(histo) /**