[DTrace-devel] [PATCH v2 2/2] dlibs: pregenerated translators for 6.10

Nick Alcock nick.alcock at oracle.com
Wed Jun 19 13:23:30 UTC 2024


On 14 Jun 2024, Alan Maguire spake thusly:

> On 13/06/2024 13:22, Alan Maguire wrote:
>> On 07/06/2024 19:41, Nick Alcock via DTrace-devel wrote:
>>> All differences from the previous translators (6.1) are no-effect
>>> ordering changes other than those one would expect from the changes to
>>> the .d files.
>>>
>>> Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
>> 
>> 
>> I hit the issue with the disappearing bd_partno field in io.d on 6.10 so
>> this is great!
>> 
>> nit: I guess defining
>> 
>> inline int dev_partno[struct block_device *B] = B->__bd_flags.counter &
>> 0xff;
>> 
>> ...might reduce complexity of some of the statements in io.d
>>
>
> sorry, ignore this I missed the handling in patch 1..

Yeah this is all generated code -- and the advantage of doing this in M4
is that it means we can do things like this even where variables aren't
allowed, because the D parser never knows.

Downside: it means dealing with M4, which is a deeply lovely language
which we should be using for everything right about the time we rewrite
the Linux kernel in Befunge.



More information about the DTrace-devel mailing list