Zhibin Li's GSoC status report - #11 of 12

Zhibin Li haoyouab at gmail.com
Mon Aug 12 15:38:36 UTC 2019


Hi all,

Accomplishments:
- Resovled the problem found last week about size of struct drm_version on
m32 and mx32. Turned out that problem came from bundling the kernel headers
into strace. It seems I should not use __kernel_size_t which is used widely
in kernel/libdrm headers but size_t instead. Otherwise the generated struct
will somehow be filled with paddings in mx32 which is not the expected.
- Searched for information about timeout_nsec field in some struct *_wait.
And them seem to be *MONOTONIC*. See below:

In linux/drivers/gpu/drm/drm_syncobj.c
function:

drm_syncobj_wait_ioctl()
drm_syncobj_timeline_wait_ioctl()

both pass timeout_nsec field to

drm_syncobj_array_wait() then drm_timeout_abs_to_jiffies().

What confused me is that the comment says:
"drm_timeout_abs_to_jiffies - calculate jiffies timeout from absolute
value".
But it uses ktime_get() and I found [1] stating that it's CLOCK_MONOTONIC.
So it's not really an absolute time right? Any opions? In case anyone wants
to take a look at the related commits. I found the link below [2] and [3].

[1]
https://www.kernel.org/doc/html/latest/core-api/timekeeping.html#c.ktime_get
[2] https://lists.freedesktop.org/archives/amd-gfx/2017-July/010840.html
[3] https://patchwork.kernel.org/patch/9847055/

- Finished decoding. Actually I'm going to send it out later. I'm polishing
the commit message. And there is one thing I haven't figure out. How do we
decide which fields to abbreviate and which to unabbrev? I found a lot of
examples in the code but couldn't see what the abbreviated parts are in
common. Is it related to number of fields or some particular informational
fields like *_count or *_ptr or val_* etc?

Priorities:
- There are a lot of changes in the decoders since last version of patch
and the previous patch of tests for them were broken. I fixed part of the
tests and manage to basically test the decoders. But due to the
complication, some of the tests are now still ugly workarounds and too
early to be merged into master. For example, a lot print_array and some
PRINT_FIELDS_* should be ported to the tests gracefully.
- I marked out some ioctl cmds as drm_noop for example DRM_IOCTL_GET_STATS
for now. I should check them all one by one to see if they are worth
decoding according to info from @esyr, that is, Linux 2.6.18+ should be
supported. BTW, since the official end of GSoC is coming, this might be
done outside of GSoC and I'm sorry for the slow progress.
- Abbreviating some ouput of decoders still needs discussion.

Thanks,
Zhibin Li
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20190812/eb038df8/attachment.html>


More information about the Strace-devel mailing list