@@ -861,7 +861,7 @@ static const char *kshark_get_info(struct pevent *pe,
* @returns The returned string contains a semicolon-separated list of data
* fields.
*/
-char* kshark_dump_entry(struct kshark_entry *entry)
+char* kshark_dump_entry(const struct kshark_entry *entry)
{
const char *event_name, *task, *lat, *info;
struct kshark_context *kshark_ctx;
@@ -133,7 +133,7 @@ void kshark_close(struct kshark_context *kshark_ctx);
void kshark_free(struct kshark_context *kshark_ctx);
-char* kshark_dump_entry(struct kshark_entry *entry);
+char* kshark_dump_entry(const struct kshark_entry *entry);
/** Bit masks used to control the visibility of the entry after filtering. */
enum kshark_filter_masks {
kshark_dump_entry() should not be able to modify the content of its input argument (kshark_entry) which is being dumped to a string. The type of the argument is changed from "struct kshark_entry*" to "const struct kshark_entry*" Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com> --- kernel-shark-qt/src/libkshark.c | 2 +- kernel-shark-qt/src/libkshark.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)