[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH v3 1/1] build: replace get-fields.sh by a python script


  • To: Anthony Perard <anthony.perard@xxxxxxxxxx>
  • From: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • Date: Wed, 18 Jan 2023 19:49:12 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=E5OmisCj2EvPhsWk+in9WxtUdVf1ElyNnmycT5M8x70=; b=A38OFVhucDwWiRjO6HfynxeNKb9B61QRq4J8fRuUvzW+G+Hump/lrJPi/QcrsflOFKdJwVtVCjuIRulbcgNKl1NdFOZF3j7/QnQO3IIKSNs7MfU3DrwOe1vn4yma4Jjw02OlzvsfijMJN7j0QMY9DNEoWhhLB1Psge6FBxI7JqROrnDT9z/8fjfMt+Gz9Z+ZoSA68qGQPc0R3pvZUNPfhe7pb/iElzWMeHDOlN1ZeL4ed2tV8dW2jrNTF2iw50QYJ3eiRGK1sD5/VvSDRphFVZ4c7vl+QArL/b+iFsOzgpulMTmYxuhSN4WxR5fPR9VJYA6wDZry/xKVl89HhLawtQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gwDqwWTZNy71NTZtiyg/0ml0oHzm1wR1DAGwwsA0REwz9B+LvrwK5p9IkRB3HiXHQ604NS8nCPk1pcocvK0q87wnzzuJ8pnhueIg5gX7GXjAbOm3YSdXpgFHfK+a3Sp2GwrzWrKGymNc8wh2XRp99mVe0qZxEbAxZCaOqFpR8ab4He/0Ln9R4X2RIrdXvl/hk20NrB53J0bbA2ox91cpBNAs4JJJUdf7tlENAL/5yQ+hDQiPPa/5hf4eUlYfxMc82/3MErFFwwU3BzLcBTIZ+oCBDWSOVVYo5Ca9FL01VT4Y6keKa6v0cr4SCHvFUhDxV244sJolfN524g6pBANizg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Wed, 18 Jan 2023 19:49:41 +0000
  • Ironport-data: A9a23:6fXnF6KPUZhGzjzeFE+RBJQlxSXFcZb7ZxGr2PjKsXjdYENSgmMEz mofUWuPPvaJMWr1e48jaoq08EIBuJaEy94wHAtlqX01Q3x08seUXt7xwmUcnc+xBpaaEB84t ZV2hv3odp1coqr0/0/1WlTZhSAgk/rOHv+kUrWs1hlZHWdMUD0mhQ9oh9k3i4tphcnRKw6Ws Jb5rta31GWNglaYCUpJrfPcwP9TlK6q4mhA5wVuPa0jUGL2zBH5MrpOfcldEFOgKmVkNrbSb /rOyri/4lTY838FYj9yuu+mGqGiaue60Tmm0hK6aYD76vRxjnVaPpIAHOgdcS9qZwChxLid/ jnvWauYEm/FNoWU8AgUvoIx/ytWZcWq85efSZSzXFD6I+QrvBIAzt03ZHzaM7H09c4nLX5Rq cZAIQsuRT6Bidy/+qCUGq5V05FLwMnDZOvzu1lG5BSAVLMMZ8CGRK/Ho9hFwD03m8ZCW+7EY NYUYiZuaxKGZABTPlAQC9Q1m+LAanvXKmUE7g7K4/dnpTGNnGSd05C0WDbRUvWMSd9YgQCzo WXe8n6iKhobKMae2XyO9XfEaurnzHihBtJDTePQGvhCm1yK+WwNEzAv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zb+YM1G80CwQ3f9xAPcXnv8E3aPiq6Y0JKqi9T75LJ9RbGk6DJl+GhRzvv7WQFqo+gxYF Z0Jq/hn+eyuXS2lFy4mllUBg==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHZKdXmSfLi4OljAEm5WNlNB2w+ZK6i3JyAgAGjEYCAABiGAA==
  • Thread-topic: [XEN PATCH v3 1/1] build: replace get-fields.sh by a python script

On 18/01/2023 6:21 pm, Anthony PERARD wrote:
> On Tue, Jan 17, 2023 at 05:21:32PM +0000, Andrew Cooper wrote:
>> On 16/01/2023 6:10 pm, Anthony PERARD wrote:
>>> +def get_typedefs(tokens):
>>> +    level = 1
>>> +    state = 0
>>> +    typedefs = []
>> I'm pretty sure typedefs actually wants to be a dict rather than a list
>> (will have better "id in typedefs" performance lower down), but that
>> wants matching with code changes elsewhere, and probably wants doing
>> separately.
> I'm not sure that going to make a difference to have "id in ()" instead
> of "id in []".

It will in the middle of a tight loop.  Less pointer chasing in memory. 
But it is very marginal.

>  I just found out that `typedefs` is always empty...
>
> I don't know what get_typedefs() is supposed to do, or at least if it
> works as expected, because it always returns "" or an empty list. (even
> the shell version)
>
> So, it would actually be a bit faster to not call get_typedefs(), but I
> don't know if that's safe.

If it is dead logic even at the shell level, drop it.  Perhaps a prereq
patch, because removing the complexity first will make this patch
simpler to follow.

The conversion is atypical python, and perf will improve (which is the
point of this patch anyway).

~Andrew

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.