* [PATCH 0/4] Various minor modifications and fixes toward KS 1.0
@ 2019-03-07 15:05 Yordan Karadzhov
2019-03-07 15:05 ` [PATCH 1/4] kernel-shark: Specify the OpenGL interface used by KernelShark Yordan Karadzhov
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Yordan Karadzhov @ 2019-03-07 15:05 UTC (permalink / raw)
To: rostedt; +Cc: linux-trace-devel, Yordan Karadzhov
Yordan Karadzhov (4):
kernel-shark: Specify the OpenGL interface used by KernelShark
kernel-shark: Fix a bug in ksmodel_zoom
kernel-shark: Fix Doxygen warning from sched_events
kernel-shark: Fix a bug in KsPluginManager
kernel-shark/CMakeLists.txt | 1 +
kernel-shark/src/KsUtils.cpp | 4 ++--
kernel-shark/src/libkshark-model.c | 4 ++--
kernel-shark/src/plugins/sched_events.c | 2 +-
4 files changed, 6 insertions(+), 5 deletions(-)
--
2.19.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/4] kernel-shark: Specify the OpenGL interface used by KernelShark
2019-03-07 15:05 [PATCH 0/4] Various minor modifications and fixes toward KS 1.0 Yordan Karadzhov
@ 2019-03-07 15:05 ` Yordan Karadzhov
2019-03-07 15:05 ` [PATCH 2/4] kernel-shark: Fix a bug in ksmodel_zoom Yordan Karadzhov
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Yordan Karadzhov @ 2019-03-07 15:05 UTC (permalink / raw)
To: rostedt; +Cc: linux-trace-devel, Yordan Karadzhov
We instruct CMAKE to prefer using the legacy libGL library, if
available. Although this is the default choice, the latest versions
of CMAKE are printing a warning message in the case when no explicit
preference is provided.
Suggested-by: Slavomir Kaslev <kaslevs@vmware.com>
Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com>
---
kernel-shark/CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel-shark/CMakeLists.txt b/kernel-shark/CMakeLists.txt
index 9460026..20ced14 100644
--- a/kernel-shark/CMakeLists.txt
+++ b/kernel-shark/CMakeLists.txt
@@ -22,6 +22,7 @@ include(${KS_DIR}/build/FindJSONC.cmake)
find_package(Doxygen)
+set(OpenGL_GL_PREFERENCE LEGACY)
find_package(OpenGL)
find_package(GLUT)
--
2.19.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/4] kernel-shark: Fix a bug in ksmodel_zoom
2019-03-07 15:05 [PATCH 0/4] Various minor modifications and fixes toward KS 1.0 Yordan Karadzhov
2019-03-07 15:05 ` [PATCH 1/4] kernel-shark: Specify the OpenGL interface used by KernelShark Yordan Karadzhov
@ 2019-03-07 15:05 ` Yordan Karadzhov
2019-03-07 15:05 ` [PATCH 3/4] kernel-shark: Fix Doxygen warning from sched_events Yordan Karadzhov
2019-03-07 15:05 ` [PATCH 4/4] kernel-shark: Fix a bug in KsPluginManager Yordan Karadzhov
3 siblings, 0 replies; 5+ messages in thread
From: Yordan Karadzhov @ 2019-03-07 15:05 UTC (permalink / raw)
To: rostedt; +Cc: linux-trace-devel, Yordan Karadzhov
When zooming-in the model is supposed to avoid over-zooming by
recalculation the Scale factor. The new value of the Scale factor is
supposed to be such that the size of the bin cannot be smaller than 5
ns. This patch fixes a naive bug in the way the new scale value is
calculated. The bug was introduced in
f97e31f00 ("kernel-shark-qt: Introduce the visualization model used by the Qt-based KS")
but had no effect until
94efea960 ("kernel-shark-qt: Handle the case when the range of the model is too small")
because the ridiculous value of the Scale factor resulted in a very
small model range and because of this such modification of the model
was always rejected.
Fixes: f97e31f00 ("kernel-shark-qt: Introduce the visualization model used by the Qt-based KS")
Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com>
---
kernel-shark/src/libkshark-model.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel-shark/src/libkshark-model.c b/kernel-shark/src/libkshark-model.c
index 4bd1e2c..7574cbe 100644
--- a/kernel-shark/src/libkshark-model.c
+++ b/kernel-shark/src/libkshark-model.c
@@ -648,8 +648,8 @@ static void ksmodel_zoom(struct kshark_trace_histo *histo,
* Avoid overzooming. If needed, adjust the Scale factor to a the value
* which provides bin_size >= 5.
*/
- if (zoom_in && range * (1 - r) < histo->n_bins * 5)
- r = 1 - (histo->n_bins * 5) / range;
+ if (zoom_in && int (range * (1. - r)) < histo->n_bins * 5)
+ r = 1. - (histo->n_bins * 5.) / range;
/*
* Now calculate the new range of the histo. Use the bin of the marker
--
2.19.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/4] kernel-shark: Fix Doxygen warning from sched_events
2019-03-07 15:05 [PATCH 0/4] Various minor modifications and fixes toward KS 1.0 Yordan Karadzhov
2019-03-07 15:05 ` [PATCH 1/4] kernel-shark: Specify the OpenGL interface used by KernelShark Yordan Karadzhov
2019-03-07 15:05 ` [PATCH 2/4] kernel-shark: Fix a bug in ksmodel_zoom Yordan Karadzhov
@ 2019-03-07 15:05 ` Yordan Karadzhov
2019-03-07 15:05 ` [PATCH 4/4] kernel-shark: Fix a bug in KsPluginManager Yordan Karadzhov
3 siblings, 0 replies; 5+ messages in thread
From: Yordan Karadzhov @ 2019-03-07 15:05 UTC (permalink / raw)
To: rostedt; +Cc: linux-trace-devel, Yordan Karadzhov
There is no reason for find_wakeup_pid being non-static. In the same
time, because it is non-static, Doxygen complains about missing
documentation for this function.
Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com>
---
kernel-shark/src/plugins/sched_events.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel-shark/src/plugins/sched_events.c b/kernel-shark/src/plugins/sched_events.c
index c52fb29..724aa19 100644
--- a/kernel-shark/src/plugins/sched_events.c
+++ b/kernel-shark/src/plugins/sched_events.c
@@ -148,7 +148,7 @@ static void plugin_register_command(struct kshark_context *kshark_ctx,
tep_register_comm(kshark_ctx->pevent, comm, pid);
}
-int find_wakeup_pid(struct kshark_context *kshark_ctx, struct kshark_entry *e,
+static int find_wakeup_pid(struct kshark_context *kshark_ctx, struct kshark_entry *e,
struct tep_event *wakeup_event, struct tep_format_field *pid_field)
{
struct tep_record *record;
--
2.19.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 4/4] kernel-shark: Fix a bug in KsPluginManager
2019-03-07 15:05 [PATCH 0/4] Various minor modifications and fixes toward KS 1.0 Yordan Karadzhov
` (2 preceding siblings ...)
2019-03-07 15:05 ` [PATCH 3/4] kernel-shark: Fix Doxygen warning from sched_events Yordan Karadzhov
@ 2019-03-07 15:05 ` Yordan Karadzhov
3 siblings, 0 replies; 5+ messages in thread
From: Yordan Karadzhov @ 2019-03-07 15:05 UTC (permalink / raw)
To: rostedt; +Cc: linux-trace-devel, Yordan Karadzhov
const char *lib = plugin.toStdString().c_str();
This line is a bad idea because the returned array may (will) be
invalidated when the destructor of std::string is called.
Fixes: 18cf94f485("kernel-shark-qt: Add KernalShark Utils")
Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com>
---
kernel-shark/src/KsUtils.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel-shark/src/KsUtils.cpp b/kernel-shark/src/KsUtils.cpp
index 34b2e2d..d7b1753 100644
--- a/kernel-shark/src/KsUtils.cpp
+++ b/kernel-shark/src/KsUtils.cpp
@@ -439,7 +439,7 @@ void KsPluginManager::registerFromList(kshark_context *kshark_ctx)
auto lamRegUser = [&kshark_ctx](const QString &plugin)
{
- const char *lib = plugin.toStdString().c_str();
+ const char *lib = plugin.toLocal8Bit().data();
kshark_register_plugin(kshark_ctx, lib);
};
@@ -474,7 +474,7 @@ void KsPluginManager::unregisterFromList(kshark_context *kshark_ctx)
auto lamUregUser = [&kshark_ctx](const QString &plugin)
{
- const char *lib = plugin.toStdString().c_str();
+ const char *lib = plugin.toLocal8Bit().data();
kshark_unregister_plugin(kshark_ctx, lib);
};
--
2.19.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-03-07 15:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-07 15:05 [PATCH 0/4] Various minor modifications and fixes toward KS 1.0 Yordan Karadzhov
2019-03-07 15:05 ` [PATCH 1/4] kernel-shark: Specify the OpenGL interface used by KernelShark Yordan Karadzhov
2019-03-07 15:05 ` [PATCH 2/4] kernel-shark: Fix a bug in ksmodel_zoom Yordan Karadzhov
2019-03-07 15:05 ` [PATCH 3/4] kernel-shark: Fix Doxygen warning from sched_events Yordan Karadzhov
2019-03-07 15:05 ` [PATCH 4/4] kernel-shark: Fix a bug in KsPluginManager Yordan Karadzhov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.