Re: [PATCH 1/4] kernel-shark: Configuration information in ${HOME}/.cache/kernelshark

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 15.04.19 г. 16:11 ч., Slavomir Kaslev wrote:
On Mon, 2019-04-15 at 14:05 +0300, Yordan Karadzhov (VMware) wrote:

On 9.04.19 г. 18:44 ч., Slavomir Kaslev wrote:
The problem is the way they are defined atm:

# First search in the user provided paths.
find_path(TRACECMD_BIN_DIR      NAMES  trace-cmd
                                  PATHS  $ENV{TRACE_CMD}/tracecmd/
                                         ${CMAKE_SOURCE_DIR}/../trac
ecmd/
                                  NO_DEFAULT_PATH)

This will never evaluate to /usr/bin which is what it should be for
distro builds.

I think there is a bit of confusion here. The code above will never
search in /usr/bin. This statement is correct.

However if this search fails we will perform another search that
will
this time search in /usr/bin. Look few lines below
in  FindTraceCmd.cmake.

Ah, I missed that.


The reason for this is to avoid confusion in the case when the user
has
the distro package installed, but in the same time is trying to
build
KernelShark from source. We want in this case the GUI to link with
the
version of the trace-cmd library that is being build (not the one
from
the package).

So how should I build kernelshark after a clean git clone for a distro
build? In particular, what sequence of commands do I need to run so
that I get fully build kernelshark with all constants pointing to the
correct places (say TRACECMD_BIN_DIR = /usr/bin). If this is not
supporeted yet (and I think it's not atm), we should at least have a
plan how we want to go about doing it. A script doing something is
always better that documenting how to achieve the same.

My understanding is that the user can do two things:
  1. sudo apt-get install kernelshark (on Ubuntu)

    In this case all libraries will be in /usr/local/lib/kshark/
                 all plugins will be in   /usr/local/lib/kshark/plugins/
           and all executables will be in /usr/local/bin/
           Or whatever is the install prefix chosen by the distro.

  2. git clone git://git.kernel.org/pub/scm/utils/trac...
     cd trace-cmd
     make gui

     in this case all libraries will be in trace-cmd/kernel-shark/lib/
                    all plugins will be in trace-cmd/kernel-shark/lib/
            and all executables will be in trace-cmd/kernel-shark/bin/

    at this point if you do:
    sudo make install gui

    option 2 became equivalent to option 1

and of course someone may decide to do both 1 and 2

Thanks!
Yordan


-- Slavi


Thanks!
Yordan





[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux