Skip to contentSkip to conversation

kernel-shark-qt: Change "pevent_" to "tep_" in Doxygen.

PATCH In review Yordan Karadzhov (VMware) 2 participants 7 messages Aug 29, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 kernel-shark-qt: Change "pevent_" to "tep_" in Doxygen.

The naming convention has changed in the code already but we forgot to do this in the Doxygen documentation.

---
 kernel-shark-qt/src/libkshark.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
kernel-shark-qt/src/libkshark.c +3 -3
index d07bdd8..1b7e544 100644
@@ -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).
Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/4 kernel-shark-qt: Restore the alignment in libkshark-configio.c

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!

---
 kernel-shark-qt/src/libkshark-configio.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
kernel-shark-qt/src/libkshark-configio.c +3 -3
index 484da93..cdc8c76 100644
@@ -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);
Signature · 1 line
2.17.1
#2 lore raw

Re: [PATCH 2/4] kernel-shark-qt: Restore the alignment in libkshark-configio.c

Quoted 5 lines · On Wed, 29 Aug 2018 19:29:25 +0300 "Yordan Karadzhov (VMware)"…

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!

I don't think I need credit for a whitespace fix patch ;-)

-- Steve

Quoted 37 lines
---
 kernel-shark-qt/src/libkshark-configio.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
kernel-shark-qt/src/libkshark-configio.c +3 -3
index 484da93..cdc8c76 100644
@@ -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);
#3 lore raw

Re: [PATCH 2/4] kernel-shark-qt: Restore the alignment in libkshark-configio.c

Quoted 6 lines · Steven Rostedt
Quoted 2 lines

This version of the patch contains a number of improvements suggested by Steven Rostedt. Thanks Steven!

I don't think I need credit for a whitespace fix patch;-)

-- Steve

:-D This patch was automatically generated during the rebase because I made the change when resolving the conflicts.

#4 lore raw

PATCH 3/4 kernel-shark-qt: Remove TODO comment in kshark_load_data_entries()

In reply to Yordan Karadzhov (VMware)

The problem described by the TODO message was fixed, but we forgot to remove the message itself.

---
 kernel-shark-qt/src/libkshark.c | 7 -------
 1 file changed, 7 deletions(-)
kernel-shark-qt/src/libkshark.c +0 -7
index 1b7e544..b4a76ae 100644
@@ -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;
Signature · 1 line
2.17.1
#5 lore raw

PATCH 4/4 kernel-shark-qt: Fix Doxygen doc. for libkshark-model.c

In reply to Yordan Karadzhov (VMware)

This patch corrects some typos in the Doxygen documentation of libkshark-model.c

---
 kernel-shark-qt/src/libkshark-model.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
kernel-shark-qt/src/libkshark-model.c +4 -4
index 3138257..246a60c 100644
@@ -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)
 
 /**
Signature · 1 line
2.17.1
#6 lore raw

Re: [PATCH 4/4] kernel-shark-qt: Fix Doxygen doc. for libkshark-model.c

Quoted 4 lines · On Wed, 29 Aug 2018 19:29:27 +0300 "Yordan Karadzhov (VMware)"…

This patch corrects some typos in the Doxygen documentation of libkshark-model.c

I applied all these and pushed them out.

Thanks Yordan!

-- Steve