On Fri, Jan 31, 2014 at 12:01:03PM +0100, Stefan Sørensen wrote:
> +static void
> +printclockname(int clockid)
> +{
> +#ifdef CLOCKID_TO_FD
> +     if(clockid < 0)
> +             tprintf("CLOCKFD(%d)", CLOCKID_TO_FD(clockid));

I'm not sure this is quite correct:
all (clockid & CLOCKFD_MASK) bits would be lost.

BTW, CLOCKFD is not the only possible case, other values (CPUCLOCK_PROF,
CPUCLOCK_VIRT, and CPUCLOCK_SCHED) are also possible and probably worth
decoding, e.g.

        if (id < 0) {
                if ((id & CLOCKFD_MASK) == CLOCKFD)
                        tprintf("FD_TO_CLOCKID(%d)", CLOCKID_TO_FD(id));
                else {
                        tprintf("MAKE_PROCESS_CPUCLOCK(%d,", CPUCLOCK_PID(id));
                        printxval(cpuclock, id & CLOCKFD_MASK, "CPUCLOCK_???");
                        tprints(")");
                }
        }


-- 
ldv

Attachment: pgpljnehAk44i.pgp
Description: PGP signature

------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
Strace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to