From: "Yordan Karadzhov (VMware)" <y.karadz@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Yordan Karadzhov <ykaradzhov@vmware.com>,
linux-trace-devel@vger.kernel.org
Subject: Re: [PATCH v3 4/8] kernel-shark: Add logic for the plugins search path
Date: Mon, 22 Apr 2019 15:21:04 +0300 [thread overview]
Message-ID: <df7b14d8-3c31-0b7d-90c3-47a788e9e30d@gmail.com> (raw)
In-Reply-To: <20190422075029.232f9b64@oasis.local.home>
On 22.04.19 г. 14:50 ч., Steven Rostedt wrote:
> On Mon, 22 Apr 2019 14:29:49 +0300
> "Yordan Karadzhov (VMware)" <y.karadz@gmail.com> wrote:
>
>
>>> I was hoping to test:
>>>
>>> string = cmdline_path() + "../../kernel-shark/lib/";
>>>
>>> If that exists, then we know that we are in the source directory.
>>
>> I don't thing this is a good idea. If we search for plugins in a path
>> that is defined like this:
>> cmdline_path() + "/something/hard/coded/lib/"
>
> Your missing the "../.." part.
>
>>
>> Then the GUI will do one thing when started like this:
>> ./kernelshark
>>
>> and anther thing when started like this:
>> bin/kernelshark
>
> No it shouldn't, unless you moved the binary.
>
> I said to add "../../plugins" to the path that the kernelshark binary
> is executed from. If you were to move kernelshark, then yes. it would
> not longer give you the same result.
>
> If the binary is in:
>
> kernelshark/bin/kernelshark
>
> and you ran it as: kernelshark/bin/kernelshark using the path
> "kernelshark/bin" and adding "../lib" would give you "kernelshark/lib"
> directory.
>
> "kernelshark/bin/../lib" == "kernelshark/lib"
>
> Also, if you were to cd to kernelshark and run
>
> "bin/kernelshark" the path would be "bin/../lib" which would be
> equal to "lib" and being in the kernelshark directory, would
> give you the plugins directory that is the same as the previous command.
>
> If you cd to kernelshark/bin and ran "./kernelshark" we would then use
> "./../lib" which is the same as "../lib" which is still the same path
> as the other two.
>
> But last call we discussed a way to find the full path name of the
> binary being executed. And if that's the case, we could not only add
> "../lib" we could also check that the binary being executed is also in
> a "kernelshark/bin" first.
>
OK, now I think I understand what you want.
Thanks!
Yordan
>>
>> and this can be very surprising behavior for the user
>>
>> The other solution has it own weaknesses, but at least it sounds like a
>> simple rule: "If you want to use the compiled version of the plugins you
>> have to start the GUI from the source code directory used to build.
>> Otherwise the installed version of the plugins will be used."
>
> Building from source, then moving that source tree to another path
> shouldn't cause the binary to act differently.
>
> -- Steve
>
next prev parent reply other threads:[~2019-04-22 12:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-19 13:50 [PATCH v3 0/8] Various modifications and fixes toward KS 1.0 Yordan Karadzhov
2019-04-19 13:50 ` [PATCH v3 1/8] kernel-shark: Configuration information in ${HOME}/.cache/kernelshark Yordan Karadzhov
2019-04-19 13:50 ` [PATCH v3 2/8] kernel-shark: Remove the definition of KS_CONF_DIR Yordan Karadzhov
2019-04-19 13:50 ` [PATCH v3 3/8] kernel-shark: Add logic for the initial path of Open-File dialogs Yordan Karadzhov
2019-04-19 16:23 ` Steven Rostedt
2019-04-19 13:50 ` [PATCH v3 4/8] kernel-shark: Add logic for the plugins search path Yordan Karadzhov
2019-04-19 17:28 ` Steven Rostedt
2019-04-22 11:29 ` Yordan Karadzhov (VMware)
2019-04-22 11:50 ` Steven Rostedt
2019-04-22 12:21 ` Yordan Karadzhov (VMware) [this message]
2019-04-19 13:50 ` [PATCH v3 5/8] kernel-shark: Rename KS_DIR to KS_SOURCE_DIR Yordan Karadzhov
2019-04-19 13:50 ` [PATCH v3 6/8] kernel-shark: Load Last Session from command line Yordan Karadzhov
2019-04-19 18:16 ` Steven Rostedt
2019-04-19 13:50 ` [PATCH v3 7/8] kernel-shark: Use proper searching condition when the dataset is small Yordan Karadzhov
2019-04-19 13:50 ` [PATCH v3 8/8] kernel-shark: Handle the case when the marker points to a filtered entry Yordan Karadzhov
2019-04-19 18:13 ` [PATCH v3 0/8] Various modifications and fixes toward KS 1.0 Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=df7b14d8-3c31-0b7d-90c3-47a788e9e30d@gmail.com \
--to=y.karadz@gmail.com \
--cc=linux-trace-devel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=ykaradzhov@vmware.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).