From: Simon Marchi <simark@simark.ca>
To: "Aktemur, Tankut Baris" <tankut.baris.aktemur@intel.com>,
Pedro Alves <palves@redhat.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH v2 3/3] gdb/jit: enable tracking multiple jitter objfiles
Date: Mon, 22 Jun 2020 13:00:16 -0400 [thread overview]
Message-ID: <2a2078fe-e921-ddee-4051-4900ad3c8f96@simark.ca> (raw)
In-Reply-To: <SN6PR11MB2893D37E72ECED3AC59C35DBC4970@SN6PR11MB2893.namprd11.prod.outlook.com>
On 2020-06-22 12:53 p.m., Aktemur, Tankut Baris via Gdb-patches wrote:
> On Monday, June 22, 2020 6:40 PM, Simon Marchi wrote:
>> On 2020-06-22 12:28 p.m., Pedro Alves wrote:
>>> On 6/21/20 4:32 AM, Simon Marchi wrote:
>>>>
>>>> I would prefer #2, because using registries is kind of our standard way to keep
>>>> per-stuff data (where stuff is objfile, program_space, inferior, etc).
>>>
>>> I'd just like to point out that the main point of the registry mechanism
>>> is dynamic registration, which is useful when you have parts of the
>>> debugger that may or not be present in the final build. E.g.,
>>> per-stuff data that is only used by some -tdep.c file. Otherwise,
>>> if we're talking about data used by some module that is _always_
>>> included in the built, then IMO the registry stuff is an unnecessary
>>> abstraction.
>>
>> What would you use instead, an explicit field in the objfile structure?
>>
>> Simon
>
> Can we use an std::unordered_map instead of
>
> static const struct objfile_key<jit_objfile_data> jit_per_objfile;
>
> ?
>
> -Baris
An std::unordered_map with the objfile* as the key? Isn't that pretty much
what objfile_key does, except that now you must manage it manually (make sure
the remove the entry when an objfile is deleted)?
Simon
next prev parent reply other threads:[~2020-06-22 17:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-16 9:49 [PATCH v2 0/3] Handling multiple JITers Tankut Baris Aktemur
2020-06-16 9:49 ` [PATCH v2 1/3] gdb/jit: pass the jiter objfile as an argument to jit_event_handler Tankut Baris Aktemur
2020-06-16 9:49 ` [PATCH v2 2/3] gdb/jit: return bool in jit_breakpoint_re_set_internal and jit_read_descriptor Tankut Baris Aktemur
2020-06-21 3:43 ` Simon Marchi
2020-06-22 12:05 ` Aktemur, Tankut Baris
2020-06-16 9:49 ` [PATCH v2 3/3] gdb/jit: enable tracking multiple jitter objfiles Tankut Baris Aktemur
2020-06-21 3:32 ` Simon Marchi
2020-06-22 16:28 ` Pedro Alves
2020-06-22 16:39 ` Simon Marchi
2020-06-22 16:53 ` Aktemur, Tankut Baris
2020-06-22 17:00 ` Simon Marchi [this message]
2020-06-23 8:16 ` Aktemur, Tankut Baris
2020-06-22 16:53 ` Pedro Alves
2020-06-22 16:52 ` Aktemur, Tankut Baris
2020-06-30 8:17 ` Aktemur, Tankut Baris
2020-07-03 2:19 ` Simon Marchi
2020-07-03 7:29 ` Aktemur, Tankut Baris
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=2a2078fe-e921-ddee-4051-4900ad3c8f96@simark.ca \
--to=simark@simark.ca \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--cc=tankut.baris.aktemur@intel.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 read-only IMAP folder(s) and NNTP newsgroup(s).