All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Tuning the KernelShark build system
@ 2019-03-08 17:15 Yordan Karadzhov
  2019-03-08 17:15 ` [PATCH 1/3] kernel-shark: Reorder the priority when searching for trace-cmd libs Yordan Karadzhov
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Yordan Karadzhov @ 2019-03-08 17:15 UTC (permalink / raw)
  To: rostedt; +Cc: linux-trace-devel, Yordan Karadzhov

This patch set combines few minor tweaks of the KernelShark build
system default configurations suggested by Steven.

Yordan Karadzhov (3):
  kernel-shark: Reorder the priority when searching for trace-cmd libs
  kernel-shark: Save the configuration information in ${HOME}/.kshark
  kernel-shark: Set the location of .kshark directory via env. variable

 Makefile                              |  2 +-
 kernel-shark/CMakeLists.txt           |  5 +++--
 kernel-shark/build/FindTraceCmd.cmake | 16 +++++++++++++---
 kernel-shark/src/KsMainWindow.cpp     | 19 ++++++++++++-------
 kernel-shark/src/KsMainWindow.hpp     |  2 ++
 5 files changed, 31 insertions(+), 13 deletions(-)

-- 
2.19.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/3] kernel-shark: Reorder the priority when searching for trace-cmd libs
  2019-03-08 17:15 [PATCH 0/3] Tuning the KernelShark build system Yordan Karadzhov
@ 2019-03-08 17:15 ` Yordan Karadzhov
  2019-03-08 17:15 ` [PATCH 2/3] kernel-shark: Save the configuration information in ${HOME}/.kshark Yordan Karadzhov
  2019-03-08 17:15 ` [PATCH 3/3] kernel-shark: Set the location of .kshark directory via env. variable Yordan Karadzhov
  2 siblings, 0 replies; 9+ messages in thread
From: Yordan Karadzhov @ 2019-03-08 17:15 UTC (permalink / raw)
  To: rostedt; +Cc: linux-trace-devel, Yordan Karadzhov

The CMAKE build system of KernelShark performs automated search for the
trace-cmd libraries, headers and executable before building the GUI.
The new order of the list of directories to search in is the following:

1. ${TRACE_CMD}/  ($TRACE_CMD is an environment variable)

2. CMAKE_SOURCE_DIR/../

3. Platform / system specific locations

Suggested-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com>
---
 kernel-shark/build/FindTraceCmd.cmake | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/kernel-shark/build/FindTraceCmd.cmake b/kernel-shark/build/FindTraceCmd.cmake
index fb2092a..b09a11b 100644
--- a/kernel-shark/build/FindTraceCmd.cmake
+++ b/kernel-shark/build/FindTraceCmd.cmake
@@ -14,17 +14,27 @@
 
 # MESSAGE(" Looking for trace-cmd ...")
 
+# First search in the user provided paths.
 find_path(TRACECMD_BIN_DIR      NAMES  trace-cmd
                                 PATHS  $ENV{TRACE_CMD}/tracecmd/
-                                       ${CMAKE_SOURCE_DIR}/../tracecmd/)
+                                       ${CMAKE_SOURCE_DIR}/../tracecmd/
+                                NO_DEFAULT_PATH)
 
 find_path(TRACECMD_INCLUDE_DIR  NAMES  trace-cmd.h
                                 PATHS  $ENV{TRACE_CMD}/include/trace-cmd/
-                                       ${CMAKE_SOURCE_DIR}/../include/trace-cmd/)
+                                       ${CMAKE_SOURCE_DIR}/../include/trace-cmd/
+                                NO_DEFAULT_PATH)
 
 find_path(TRACECMD_LIBRARY_DIR  NAMES  libtracecmd.a
                                 PATHS  $ENV{TRACE_CMD}/lib/trace-cmd/
-                                       ${CMAKE_SOURCE_DIR}/../lib/trace-cmd/)
+                                       ${CMAKE_SOURCE_DIR}/../lib/trace-cmd/
+                                NO_DEFAULT_PATH)
+
+# If not found, search in the default system paths. Note that if the previous
+# search was successful "find_path" will do nothing this time.
+find_path(TRACECMD_BIN_DIR      NAMES  trace-cmd)
+find_path(TRACECMD_INCLUDE_DIR  NAMES  trace-cmd.h)
+find_path(TRACECMD_LIBRARY_DIR  NAMES  libtracecmd.a)
 
 IF (TRACECMD_INCLUDE_DIR AND TRACECMD_LIBRARY_DIR)
 
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/3] kernel-shark: Save the configuration information in ${HOME}/.kshark
  2019-03-08 17:15 [PATCH 0/3] Tuning the KernelShark build system Yordan Karadzhov
  2019-03-08 17:15 ` [PATCH 1/3] kernel-shark: Reorder the priority when searching for trace-cmd libs Yordan Karadzhov
@ 2019-03-08 17:15 ` Yordan Karadzhov
  2019-03-11 12:20   ` Slavomir Kaslev
  2019-03-08 17:15 ` [PATCH 3/3] kernel-shark: Set the location of .kshark directory via env. variable Yordan Karadzhov
  2 siblings, 1 reply; 9+ messages in thread
From: Yordan Karadzhov @ 2019-03-08 17:15 UTC (permalink / raw)
  To: rostedt; +Cc: linux-trace-devel, Yordan Karadzhov

By default the "Last session" configuration file will be saved in
${HOME}/.kshark

Suggested-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com>
---
 Makefile                    | 2 +-
 kernel-shark/CMakeLists.txt | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index b780718..967c364 100644
--- a/Makefile
+++ b/Makefile
@@ -254,7 +254,7 @@ all_cmd: $(CMD_TARGETS)
 CMAKE_COMMAND = /usr/bin/cmake
 
 $(kshark-dir)/build/Makefile: $(kshark-dir)/CMakeLists.txt
-	$(Q) cd $(kshark-dir)/build && $(CMAKE_COMMAND) ..
+	$(Q) cd $(kshark-dir)/build && $(CMAKE_COMMAND) -DKS_CONF_DIR=$(HOME)/.kshark ..
 
 gui: force $(CMD_TARGETS) $(kshark-dir)/build/Makefile
 	$(Q)$(MAKE) $(S) -C $(kshark-dir)/build
diff --git a/kernel-shark/CMakeLists.txt b/kernel-shark/CMakeLists.txt
index 20ced14..3c3beb0 100644
--- a/kernel-shark/CMakeLists.txt
+++ b/kernel-shark/CMakeLists.txt
@@ -14,7 +14,7 @@ set(KS_DIR ${CMAKE_SOURCE_DIR})
 
 # Make a directory to hold configuration files. To change this do:
 # cmake .. -DKS_CONF_DIR=/your/preferred/path
-set(KS_CONF_DIR "${KS_DIR}/.ksconf" CACHE STRING "Directory for configuration files.")
+set(KS_CONF_DIR "$ENV{HOME}/.kshark" CACHE STRING "Directory for configuration files.")
 file(MAKE_DIRECTORY ${KS_CONF_DIR})
 
 include(${KS_DIR}/build/FindTraceCmd.cmake)
@@ -59,7 +59,8 @@ include_directories(${KS_DIR}/src/
 message("")
 message(STATUS "C flags      : " ${CMAKE_C_FLAGS})
 message(STATUS "CXX flags    : " ${CMAKE_CXX_FLAGS})
-message(STATUS "Linker flags : " ${CMAKE_EXE_LINKER_FLAGS})
+message(STATUS "Linker flags : " ${CMAKE_EXE_LINKER_FLAGS}\n)
+message(STATUS "config. files saved in ${KS_CONF_DIR}")
 
 add_subdirectory(${KS_DIR}/src)
 add_subdirectory(${KS_DIR}/examples)
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/3] kernel-shark: Set the location of .kshark directory via env. variable
  2019-03-08 17:15 [PATCH 0/3] Tuning the KernelShark build system Yordan Karadzhov
  2019-03-08 17:15 ` [PATCH 1/3] kernel-shark: Reorder the priority when searching for trace-cmd libs Yordan Karadzhov
  2019-03-08 17:15 ` [PATCH 2/3] kernel-shark: Save the configuration information in ${HOME}/.kshark Yordan Karadzhov
@ 2019-03-08 17:15 ` Yordan Karadzhov
  2019-03-11 12:16   ` Slavomir Kaslev
  2 siblings, 1 reply; 9+ messages in thread
From: Yordan Karadzhov @ 2019-03-08 17:15 UTC (permalink / raw)
  To: rostedt; +Cc: linux-trace-devel, Yordan Karadzhov

The environment variable ${KS_CONF_DIR} can be used to specify the
directory where the "Last session" configuration file will be saved.

Suggested-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com>
---
 kernel-shark/src/KsMainWindow.cpp | 19 ++++++++++++-------
 kernel-shark/src/KsMainWindow.hpp |  2 ++
 2 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/kernel-shark/src/KsMainWindow.cpp b/kernel-shark/src/KsMainWindow.cpp
index 2d61c3f..7f39c14 100644
--- a/kernel-shark/src/KsMainWindow.cpp
+++ b/kernel-shark/src/KsMainWindow.cpp
@@ -133,9 +133,7 @@ KsMainWindow::KsMainWindow(QWidget *parent)
 KsMainWindow::~KsMainWindow()
 {
 	kshark_context *kshark_ctx(nullptr);
-	QString file = KS_CONF_DIR;
-
-	file += "/lastsession.json";
+	QString file = _getLastSessionFile();
 
 	_updateSession();
 	kshark_save_config_file(file.toLocal8Bit().data(),
@@ -368,12 +366,19 @@ void KsMainWindow::_open()
 		loadDataFile(fileName);
 }
 
-void KsMainWindow::_restorSession()
+QString KsMainWindow::_getLastSessionFile()
 {
-	QString file = KS_CONF_DIR;
-	file += "/lastsession.json";
+	const char *file = getenv("KS_CONF_DIR");
 
-	loadSession(file);
+	if (!file)
+		file = KS_CONF_DIR;
+
+	return QString(file) +  "/lastsession.json";
+}
+
+void KsMainWindow::_restorSession()
+{
+	loadSession(_getLastSessionFile());
 	_graph.updateGeom();
 }
 
diff --git a/kernel-shark/src/KsMainWindow.hpp b/kernel-shark/src/KsMainWindow.hpp
index 0727631..9b7ec6d 100644
--- a/kernel-shark/src/KsMainWindow.hpp
+++ b/kernel-shark/src/KsMainWindow.hpp
@@ -153,6 +153,8 @@ private:
 
 	void _open();
 
+	QString _getLastSessionFile();
+
 	void _restorSession();
 
 	void _importSession();
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/3] kernel-shark: Set the location of .kshark directory via env. variable
  2019-03-08 17:15 ` [PATCH 3/3] kernel-shark: Set the location of .kshark directory via env. variable Yordan Karadzhov
@ 2019-03-11 12:16   ` Slavomir Kaslev
  2019-03-11 17:44     ` Yordan Karadzhov (VMware)
  0 siblings, 1 reply; 9+ messages in thread
From: Slavomir Kaslev @ 2019-03-11 12:16 UTC (permalink / raw)
  To: Yordan Karadzhov; +Cc: Steven Rostedt, linux-trace-devel

On Fri, Mar 8, 2019 at 7:16 PM Yordan Karadzhov <ykaradzhov@vmware.com> wrote:
>
> The environment variable ${KS_CONF_DIR} can be used to specify the
> directory where the "Last session" configuration file will be saved.
>
> Suggested-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
> Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com>
> ---
>  kernel-shark/src/KsMainWindow.cpp | 19 ++++++++++++-------
>  kernel-shark/src/KsMainWindow.hpp |  2 ++
>  2 files changed, 14 insertions(+), 7 deletions(-)
>
> diff --git a/kernel-shark/src/KsMainWindow.cpp b/kernel-shark/src/KsMainWindow.cpp
> index 2d61c3f..7f39c14 100644
> --- a/kernel-shark/src/KsMainWindow.cpp
> +++ b/kernel-shark/src/KsMainWindow.cpp
> @@ -133,9 +133,7 @@ KsMainWindow::KsMainWindow(QWidget *parent)
>  KsMainWindow::~KsMainWindow()
>  {
>         kshark_context *kshark_ctx(nullptr);
> -       QString file = KS_CONF_DIR;
> -
> -       file += "/lastsession.json";
> +       QString file = _getLastSessionFile();
>
>         _updateSession();
>         kshark_save_config_file(file.toLocal8Bit().data(),
> @@ -368,12 +366,19 @@ void KsMainWindow::_open()
>                 loadDataFile(fileName);
>  }
>
> -void KsMainWindow::_restorSession()
> +QString KsMainWindow::_getLastSessionFile()
>  {
> -       QString file = KS_CONF_DIR;
> -       file += "/lastsession.json";
> +       const char *file = getenv("KS_CONF_DIR");
>
> -       loadSession(file);
> +       if (!file)
> +               file = KS_CONF_DIR;
> +
> +       return QString(file) +  "/lastsession.json";
> +}
> +
> +void KsMainWindow::_restorSession()

Nit: typo _restorSession()  -> _restoreSession()

> +{
> +       loadSession(_getLastSessionFile());
>         _graph.updateGeom();
>  }
>
> diff --git a/kernel-shark/src/KsMainWindow.hpp b/kernel-shark/src/KsMainWindow.hpp
> index 0727631..9b7ec6d 100644
> --- a/kernel-shark/src/KsMainWindow.hpp
> +++ b/kernel-shark/src/KsMainWindow.hpp
> @@ -153,6 +153,8 @@ private:
>
>         void _open();
>
> +       QString _getLastSessionFile();
> +
>         void _restorSession();
>
>         void _importSession();
> --
> 2.19.1
>


-- 
Slavomir Kaslev

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/3] kernel-shark: Save the configuration information in ${HOME}/.kshark
  2019-03-08 17:15 ` [PATCH 2/3] kernel-shark: Save the configuration information in ${HOME}/.kshark Yordan Karadzhov
@ 2019-03-11 12:20   ` Slavomir Kaslev
  2019-03-11 15:33     ` Steven Rostedt
  0 siblings, 1 reply; 9+ messages in thread
From: Slavomir Kaslev @ 2019-03-11 12:20 UTC (permalink / raw)
  To: Yordan Karadzhov; +Cc: Steven Rostedt, linux-trace-devel

On Fri, Mar 8, 2019 at 7:16 PM Yordan Karadzhov <ykaradzhov@vmware.com> wrote:
>
> By default the "Last session" configuration file will be saved in
> ${HOME}/.kshark

${HOME}/.config/foobar seems to be the standard path these days for
config files[1]. Wdyt about switching it to ${HOME}/.config/khark?

[1] https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

-- Slavi

>
> Suggested-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
> Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com>
> ---
>  Makefile                    | 2 +-
>  kernel-shark/CMakeLists.txt | 5 +++--
>  2 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index b780718..967c364 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -254,7 +254,7 @@ all_cmd: $(CMD_TARGETS)
>  CMAKE_COMMAND = /usr/bin/cmake
>
>  $(kshark-dir)/build/Makefile: $(kshark-dir)/CMakeLists.txt
> -       $(Q) cd $(kshark-dir)/build && $(CMAKE_COMMAND) ..
> +       $(Q) cd $(kshark-dir)/build && $(CMAKE_COMMAND) -DKS_CONF_DIR=$(HOME)/.kshark ..
>
>  gui: force $(CMD_TARGETS) $(kshark-dir)/build/Makefile
>         $(Q)$(MAKE) $(S) -C $(kshark-dir)/build
> diff --git a/kernel-shark/CMakeLists.txt b/kernel-shark/CMakeLists.txt
> index 20ced14..3c3beb0 100644
> --- a/kernel-shark/CMakeLists.txt
> +++ b/kernel-shark/CMakeLists.txt
> @@ -14,7 +14,7 @@ set(KS_DIR ${CMAKE_SOURCE_DIR})
>
>  # Make a directory to hold configuration files. To change this do:
>  # cmake .. -DKS_CONF_DIR=/your/preferred/path
> -set(KS_CONF_DIR "${KS_DIR}/.ksconf" CACHE STRING "Directory for configuration files.")
> +set(KS_CONF_DIR "$ENV{HOME}/.kshark" CACHE STRING "Directory for configuration files.")
>  file(MAKE_DIRECTORY ${KS_CONF_DIR})
>
>  include(${KS_DIR}/build/FindTraceCmd.cmake)
> @@ -59,7 +59,8 @@ include_directories(${KS_DIR}/src/
>  message("")
>  message(STATUS "C flags      : " ${CMAKE_C_FLAGS})
>  message(STATUS "CXX flags    : " ${CMAKE_CXX_FLAGS})
> -message(STATUS "Linker flags : " ${CMAKE_EXE_LINKER_FLAGS})
> +message(STATUS "Linker flags : " ${CMAKE_EXE_LINKER_FLAGS}\n)
> +message(STATUS "config. files saved in ${KS_CONF_DIR}")
>
>  add_subdirectory(${KS_DIR}/src)
>  add_subdirectory(${KS_DIR}/examples)
> --
> 2.19.1
>


-- 
Slavomir Kaslev

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/3] kernel-shark: Save the configuration information in ${HOME}/.kshark
  2019-03-11 12:20   ` Slavomir Kaslev
@ 2019-03-11 15:33     ` Steven Rostedt
  2019-03-11 17:16       ` Yordan Karadzhov (VMware)
  0 siblings, 1 reply; 9+ messages in thread
From: Steven Rostedt @ 2019-03-11 15:33 UTC (permalink / raw)
  To: Slavomir Kaslev; +Cc: Yordan Karadzhov, linux-trace-devel, Patrick McLean

On Mon, 11 Mar 2019 14:20:23 +0200
Slavomir Kaslev <slavomir.kaslev@gmail.com> wrote:

> On Fri, Mar 8, 2019 at 7:16 PM Yordan Karadzhov <ykaradzhov@vmware.com> wrote:
> >
> > By default the "Last session" configuration file will be saved in
> > ${HOME}/.kshark  
> 
> ${HOME}/.config/foobar seems to be the standard path these days for
> config files[1]. Wdyt about switching it to ${HOME}/.config/khark?
> 
> [1] https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

Yeah, I was talking with Patrick McLean (who is a package maintainer
for Gentoo) at SCaLE and was saying that we should look at .config. And
that's the reference he pointed me to as well.

Note, we may need to use both .config and .cache, as I'm thinking
that .cache is better for the saving of last session, and .config
should be the default for user defined sessions (Export Session).

-- Steve


> 
> -- Slavi
> 
> >
> > Suggested-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
> > Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com>
> > ---
> >  Makefile                    | 2 +-
> >  kernel-shark/CMakeLists.txt | 5 +++--
> >  2 files changed, 4 insertions(+), 3 deletions(-)
> >
> > diff --git a/Makefile b/Makefile
> > index b780718..967c364 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -254,7 +254,7 @@ all_cmd: $(CMD_TARGETS)
> >  CMAKE_COMMAND = /usr/bin/cmake
> >
> >  $(kshark-dir)/build/Makefile: $(kshark-dir)/CMakeLists.txt
> > -       $(Q) cd $(kshark-dir)/build && $(CMAKE_COMMAND) ..
> > +       $(Q) cd $(kshark-dir)/build && $(CMAKE_COMMAND) -DKS_CONF_DIR=$(HOME)/.kshark ..
> >
> >  gui: force $(CMD_TARGETS) $(kshark-dir)/build/Makefile
> >         $(Q)$(MAKE) $(S) -C $(kshark-dir)/build
> > diff --git a/kernel-shark/CMakeLists.txt b/kernel-shark/CMakeLists.txt
> > index 20ced14..3c3beb0 100644
> > --- a/kernel-shark/CMakeLists.txt
> > +++ b/kernel-shark/CMakeLists.txt
> > @@ -14,7 +14,7 @@ set(KS_DIR ${CMAKE_SOURCE_DIR})
> >
> >  # Make a directory to hold configuration files. To change this do:
> >  # cmake .. -DKS_CONF_DIR=/your/preferred/path
> > -set(KS_CONF_DIR "${KS_DIR}/.ksconf" CACHE STRING "Directory for configuration files.")
> > +set(KS_CONF_DIR "$ENV{HOME}/.kshark" CACHE STRING "Directory for configuration files.")
> >  file(MAKE_DIRECTORY ${KS_CONF_DIR})
> >
> >  include(${KS_DIR}/build/FindTraceCmd.cmake)
> > @@ -59,7 +59,8 @@ include_directories(${KS_DIR}/src/
> >  message("")
> >  message(STATUS "C flags      : " ${CMAKE_C_FLAGS})
> >  message(STATUS "CXX flags    : " ${CMAKE_CXX_FLAGS})
> > -message(STATUS "Linker flags : " ${CMAKE_EXE_LINKER_FLAGS})
> > +message(STATUS "Linker flags : " ${CMAKE_EXE_LINKER_FLAGS}\n)
> > +message(STATUS "config. files saved in ${KS_CONF_DIR}")
> >
> >  add_subdirectory(${KS_DIR}/src)
> >  add_subdirectory(${KS_DIR}/examples)
> > --
> > 2.19.1
> >  
> 
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/3] kernel-shark: Save the configuration information in ${HOME}/.kshark
  2019-03-11 15:33     ` Steven Rostedt
@ 2019-03-11 17:16       ` Yordan Karadzhov (VMware)
  0 siblings, 0 replies; 9+ messages in thread
From: Yordan Karadzhov (VMware) @ 2019-03-11 17:16 UTC (permalink / raw)
  To: Steven Rostedt, Slavomir Kaslev
  Cc: Yordan Karadzhov, linux-trace-devel, Patrick McLean



On 11.03.19 г. 17:33 ч., Steven Rostedt wrote:
> On Mon, 11 Mar 2019 14:20:23 +0200
> Slavomir Kaslev <slavomir.kaslev@gmail.com> wrote:
> 
>> On Fri, Mar 8, 2019 at 7:16 PM Yordan Karadzhov <ykaradzhov@vmware.com> wrote:
>>>
>>> By default the "Last session" configuration file will be saved in
>>> ${HOME}/.kshark
>>
>> ${HOME}/.config/foobar seems to be the standard path these days for
>> config files[1]. Wdyt about switching it to ${HOME}/.config/khark?
>>
>> [1] https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
> 
> Yeah, I was talking with Patrick McLean (who is a package maintainer
> for Gentoo) at SCaLE and was saying that we should look at .config. And
> that's the reference he pointed me to as well.
> 
> Note, we may need to use both .config and .cache, as I'm thinking
> that .cache is better for the saving of last session, and .config
> should be the default for user defined sessions (Export Session).
> 

I will rework the patch.
Thanks a lot!
Y.



> -- Steve
> 
> 
>>
>> -- Slavi
>>
>>>
>>> Suggested-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
>>> Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com>
>>> ---
>>>   Makefile                    | 2 +-
>>>   kernel-shark/CMakeLists.txt | 5 +++--
>>>   2 files changed, 4 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/Makefile b/Makefile
>>> index b780718..967c364 100644
>>> --- a/Makefile
>>> +++ b/Makefile
>>> @@ -254,7 +254,7 @@ all_cmd: $(CMD_TARGETS)
>>>   CMAKE_COMMAND = /usr/bin/cmake
>>>
>>>   $(kshark-dir)/build/Makefile: $(kshark-dir)/CMakeLists.txt
>>> -       $(Q) cd $(kshark-dir)/build && $(CMAKE_COMMAND) ..
>>> +       $(Q) cd $(kshark-dir)/build && $(CMAKE_COMMAND) -DKS_CONF_DIR=$(HOME)/.kshark ..
>>>
>>>   gui: force $(CMD_TARGETS) $(kshark-dir)/build/Makefile
>>>          $(Q)$(MAKE) $(S) -C $(kshark-dir)/build
>>> diff --git a/kernel-shark/CMakeLists.txt b/kernel-shark/CMakeLists.txt
>>> index 20ced14..3c3beb0 100644
>>> --- a/kernel-shark/CMakeLists.txt
>>> +++ b/kernel-shark/CMakeLists.txt
>>> @@ -14,7 +14,7 @@ set(KS_DIR ${CMAKE_SOURCE_DIR})
>>>
>>>   # Make a directory to hold configuration files. To change this do:
>>>   # cmake .. -DKS_CONF_DIR=/your/preferred/path
>>> -set(KS_CONF_DIR "${KS_DIR}/.ksconf" CACHE STRING "Directory for configuration files.")
>>> +set(KS_CONF_DIR "$ENV{HOME}/.kshark" CACHE STRING "Directory for configuration files.")
>>>   file(MAKE_DIRECTORY ${KS_CONF_DIR})
>>>
>>>   include(${KS_DIR}/build/FindTraceCmd.cmake)
>>> @@ -59,7 +59,8 @@ include_directories(${KS_DIR}/src/
>>>   message("")
>>>   message(STATUS "C flags      : " ${CMAKE_C_FLAGS})
>>>   message(STATUS "CXX flags    : " ${CMAKE_CXX_FLAGS})
>>> -message(STATUS "Linker flags : " ${CMAKE_EXE_LINKER_FLAGS})
>>> +message(STATUS "Linker flags : " ${CMAKE_EXE_LINKER_FLAGS}\n)
>>> +message(STATUS "config. files saved in ${KS_CONF_DIR}")
>>>
>>>   add_subdirectory(${KS_DIR}/src)
>>>   add_subdirectory(${KS_DIR}/examples)
>>> --
>>> 2.19.1
>>>   
>>
>>
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/3] kernel-shark: Set the location of .kshark directory via env. variable
  2019-03-11 12:16   ` Slavomir Kaslev
@ 2019-03-11 17:44     ` Yordan Karadzhov (VMware)
  0 siblings, 0 replies; 9+ messages in thread
From: Yordan Karadzhov (VMware) @ 2019-03-11 17:44 UTC (permalink / raw)
  To: Slavomir Kaslev, Yordan Karadzhov; +Cc: Steven Rostedt, linux-trace-devel



On 11.03.19 г. 14:16 ч., Slavomir Kaslev wrote:
>> +}
>> +
>> +void KsMainWindow::_restorSession()
> Nit: typo _restorSession()  -> _restoreSession()
> 
>> +{
>> +       loadSession(_getLastSessionFile());
>>          _graph.updateGeom();
>>   }

Very well spotted, thanks a lot!
I will fix this.
Y.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-03-11 17:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-08 17:15 [PATCH 0/3] Tuning the KernelShark build system Yordan Karadzhov
2019-03-08 17:15 ` [PATCH 1/3] kernel-shark: Reorder the priority when searching for trace-cmd libs Yordan Karadzhov
2019-03-08 17:15 ` [PATCH 2/3] kernel-shark: Save the configuration information in ${HOME}/.kshark Yordan Karadzhov
2019-03-11 12:20   ` Slavomir Kaslev
2019-03-11 15:33     ` Steven Rostedt
2019-03-11 17:16       ` Yordan Karadzhov (VMware)
2019-03-08 17:15 ` [PATCH 3/3] kernel-shark: Set the location of .kshark directory via env. variable Yordan Karadzhov
2019-03-11 12:16   ` Slavomir Kaslev
2019-03-11 17:44     ` Yordan Karadzhov (VMware)

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.