From: "Yordan Karadzhov (VMware)" <y.karadz@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-trace-devel@vger.kernel.org,
Tzvetomir Stoyanov <tz.stoyanov@gmail.com>
Subject: Re: [PATCH 2/2] kernel-shark-qt: Add Json I/O for filter configurations.
Date: Wed, 8 Aug 2018 15:59:32 +0300 [thread overview]
Message-ID: <6dadf888-d606-1fac-bd0a-101aca863724@gmail.com> (raw)
In-Reply-To: <20180808083219.642bbb71@gandalf.local.home>
On 8.08.2018 15:32, Steven Rostedt wrote:
> On Wed, 8 Aug 2018 14:48:10 +0300
> "Yordan Karadzhov (VMware)" <y.karadz@gmail.com> wrote:
>
>> Hi Steven,
>>
>> On 8.08.2018 04:21, Steven Rostedt wrote:
>>>> /**
>>>> + * @brief Create an empty Json document and set its type description.
>>>> + *
>>>> + * @param type: String describing the type of the document,
>>>> + * e.g. "kshark.record.config" or "kshark.filter.config".
>>>> + *
>>>> + * @returns json_object instance. Use json_object_put() to free the object.
>>> I wonder if we should add handlers like:
>>>
>>> kshark_config_free(struct json_object *jobj);
>>>
>>> and call that instead? Perhaps even create our own object that may
>>> contain extra state that the json object does not, and return that?
>>>
>>>
>>
>> What do we gain by doing it this way?
>>
>
> CONTROL!!!!! :-) :-)
>
>
> But seriously, if we had our own abstraction for the json objects, we
> could carry extra data along with it if need be. In fact, we could
> abstract out completely that we use json. We could just add our own
> wrappers, and if some day in the future, something else comes along
> that's better than json, we could switch to that.
>
OK will try to implement a wrapper and abstract out the use json.
Thanks!
Yordan
> I'm not strongly committed to doing this abstraction, but I want us to
> think about it before we commit to anything. Like I said, forward
> compatibility is the difficult part. I don't know exactly how this is
> all going to end up being used, but I like to keep my options open.
>
> -- Steve
>
next prev parent reply other threads:[~2018-08-08 15:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-07 16:00 [PATCH 1/2] kernel-shark-qt: Add Json-C as a third party dependency Yordan Karadzhov (VMware)
2018-08-07 16:00 ` [PATCH 2/2] kernel-shark-qt: Add Json I/O for filter configurations Yordan Karadzhov (VMware)
2018-08-08 1:21 ` Steven Rostedt
2018-08-08 11:48 ` Yordan Karadzhov (VMware)
2018-08-08 12:32 ` Steven Rostedt
2018-08-08 12:59 ` Yordan Karadzhov (VMware) [this message]
2018-08-08 11:48 ` Yordan Karadzhov (VMware)
2018-08-08 12:33 ` 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=6dadf888-d606-1fac-bd0a-101aca863724@gmail.com \
--to=y.karadz@gmail.com \
--cc=linux-trace-devel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=tz.stoyanov@gmail.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).