All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Sven Schnelle <svens@stackframe.org>
Cc: Alexandre Iooss <erdnaxe@crans.org>,
	 Mahmoud Mandour <ma.mandourr@gmail.com>,
	 Pierrick Bouvier <pierrick.bouvier@linaro.org>,
	qemu-devel@nongnu.org,  deller@gmx.de
Subject: Re: [PATCH v3 01/12] util/log: convert debug_regions to GList
Date: Mon, 04 Mar 2024 17:58:48 +0000	[thread overview]
Message-ID: <87il21yj3b.fsf@draig.linaro.org> (raw)
In-Reply-To: <87bk7uue47.fsf@t14.stackframe.org> (Sven Schnelle's message of "Mon, 04 Mar 2024 17:59:52 +0100")

Sven Schnelle <svens@stackframe.org> writes:

> Alex Bennée <alex.bennee@linaro.org> writes:
>
>> Sven Schnelle <svens@stackframe.org> writes:
>>
>>> In preparation of making the parsing part of qemu_set_dfilter_ranges()
>>> available to other users, convert it to return a GList, so the result
>>> can be used with other functions taking a GList of struct Range.
>>
>> Why do we need to convert it to a Glist? When I originally wrote the
>> dfilter code I deliberately chose GArray over GList to avoid bouncing
>> across cache lines during the tight loop that is checking ranges. It's
>> not like we can't pass GArray's to plugins as well?
>
> Looking at the code again, i remember that the reason for choosing GList
> was that the other range matching function all take GList's - having
> some functions take GArray's, and some not would be odd.

Ahh I see. There wasn't intended to be much of a relationship between
the dfilter code and the range code apart from the fact I re-used the
Range typedef to avoid duplication.

> So i wonder
> whether we should convert all of those functions to GArray? (if
> possible, i haven't checked)

I think that would depend on access patterns and flexibility. For the
dfilter there is no particular need for sorting and the principle
operation is a sequence of lookups. For the other use cases keeping a
sorted list and quick insertion might be more useful.

While its tempting to go on a wider re-factoring I would caution against
it so close to softfreeze.

> What do you think?

Lets stick to the dfilter case and worry about wider clean-ups later. As
Richard points out it might be the interval tree makes more sense for
some of these things.

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


  reply	other threads:[~2024-03-04 17:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-01 17:45 [PATCH v3 00/12] plugins/execlog: add data address match and address range support Sven Schnelle
2024-03-01 17:45 ` [PATCH v3 01/12] util/log: convert debug_regions to GList Sven Schnelle
2024-03-04 10:34   ` Alex Bennée
2024-03-04 13:13     ` Sven Schnelle
2024-03-04 17:00       ` Richard Henderson
2024-03-04 16:59     ` Sven Schnelle
2024-03-04 17:58       ` Alex Bennée [this message]
2024-03-04 19:12         ` Sven Schnelle
2024-03-01 17:45 ` [PATCH v3 02/12] util/log: make qemu_set_dfilter_ranges() take a GList Sven Schnelle
2024-03-01 17:46 ` [PATCH v3 03/12] util/range: move range_list_from_string() to range.c Sven Schnelle
2024-03-01 17:46 ` [PATCH v3 04/12] util/range: add range_list_free() Sven Schnelle
2024-03-01 17:46 ` [PATCH v3 05/12] util/range: use append_new_range() in range_list_from_string() Sven Schnelle
2024-03-01 17:46 ` [PATCH v3 06/12] util/range: split up range_list_from_string() Sven Schnelle
2024-03-01 17:46 ` [PATCH v3 07/12] util/range: make range_list_from_string() accept a single number Sven Schnelle
2024-03-01 17:46 ` [PATCH v3 08/12] qemu/range: add range_list_contains() function Sven Schnelle
2024-03-01 17:46 ` [PATCH v3 09/12] plugins: add API to print errors Sven Schnelle
2024-03-01 17:46 ` [PATCH v3 10/12] plugins: add range list API Sven Schnelle
2024-03-03 17:45   ` Bernhard Beschow
2024-03-01 17:46 ` [PATCH v3 11/12] plugins/execlog: use range list api Sven Schnelle
2024-03-01 17:46 ` [PATCH v3 12/12] plugins/execlog: add data address match Sven Schnelle

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=87il21yj3b.fsf@draig.linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=deller@gmx.de \
    --cc=erdnaxe@crans.org \
    --cc=ma.mandourr@gmail.com \
    --cc=pierrick.bouvier@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=svens@stackframe.org \
    /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 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.