Hi Alan,
Many thanks for your response!
On 2013-12-25 02:49, Alan Stern wrote:
>
> This was a long and rather rambling message.
Sorry about that, it was my attempt at being detailed :)
> The main points I
> gathered from it were:
>
> You are using a very old kernel version. You really should use
> something more up-to-date, if at all possible.
>
Yes; however, my current project is a part of a series that were done on those
kernel versions, so I want to keep the kernel version the same.
> You are trying to combine ftrace with usbmon. I know extremely
> little about ftrace, so I can't help you there.
>
Yes, I am.
> You want to know how to correlate kernel time values with the
> timestamps produced by usbmon.
>
Yes, I do.
> The last part is easy enough to do. You can call the following
> subroutine to get a usbmon-style timestamp value, which can then be
> added to an ftrace message or simply printed in the kernel log:
Fantastic, that will do!
Many thanks again,
Cheers!
>
> #include <linux/time.h>
>
> static unsigned usbmon_timestamp(void)
> {
> struct timeval tval;
> unsigned stamp;
>
> do_gettimeofday(&tval);
> stamp = tval.tv_sec & 0xFFF;
> stamp = stamp * 1000000 + tval.tv_usec;
> return stamp;
> }
>
> For example,
>
> pr_info("The usbmon time is: %u\n", usbmon_timestamp());
>
> Alan Stern
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html