>>> On 15.03.18 at 21:09, <andrew.coop...@citrix.com> wrote:
> On 13/03/18 12:05, Roger Pau Monné wrote:
>> Maybe this could be:
>>
>> if ( is_idle_domain(d) )
>> ...
>> else
>> {
>>     rc = is_hvm_domain(d) ? hvm_domain_initialise(d)
>>                           : pv_domain_initialise(d);
>>     if ( rc )
>>         goto fail;
>> }
>>
>> But that's maybe out of the scope of this patch.
> 
> I'd actually like to reconsider our use of this design pattern.
> 
> As far as I can tell from some XTF examples, it forces the use of a
> function pointer rather than an "if call else call" which in turn
> forcibly out-of-lines static inline stubs, and prevents LTO from merging
> a cross TU call into its sole caller.

Where's the function pointer coming from? I could see that happening
with

     rc = (is_hvm_domain(d) ? hvm_domain_initialise
                            : pv_domain_initialise)(d);

which I think Roger has been using variants of in a few other
patches of his (and which I've been debating with myself whether
to comment on while reviewing those patches).

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to