IP Library › Granted Patent US 12,687,883
Granted Patent B2
US 12,687,883 · App. 18/777,143 · Granted Jul 21, 2026

Timestamp synchronization across virtual machines

Inventors: Xiaoqin Ma (Los Altos, CA); Enrico Granata (Florence, MT)
Assignee: Google LLC
G06F1/12G06F9/45533G06F1/04G06F1/14G06F11/3466
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,687,883
App. No.
18/777,143
Filed
Jul 18, 2024
Granted
Jul 21, 2026
Kind
B2
Examiner
BAE, JI H
Art Unit
2176
USPC
713/400
Abstract

Timestamp synchronization may be performed by determining a time offset between a first virtual machine having a first virtual clock counter of a computing system and a second virtual machine having a second virtual clock counter of the computing system; and adjusting timestamps of traces with timestamps based on the second virtual clock counter according to the time offset.

Claims (53)

1 . A method comprising:

determining, by a computing system, a time offset between a first virtual machine having a first virtual clock counter of the computing system and a second virtual machine having a second virtual clock counter of the computing system;

storing, by the computing system and in a memory page shared by the first virtual machine and the second virtual machine, information regarding the first virtual clock counter;

reading, by the computing system, the information regarding the first virtual clock counter; and

adjusting, by the computing system and based on the information regarding the first virtual clock counter, timestamps of traces based on the second virtual clock counter according to the time offset.

2 . The method of claim 1 , wherein adjusting the timestamps further comprises subtracting the time offset from the timestamps.

3 . The method of claim 1 , wherein determining the time offset further comprises running a precision time protocol between the first virtual machine and the second virtual machine.

4 . The method of claim 1 , wherein determining the time offset further comprises:

running a precision time protocol between the first virtual machine and a second computing system to determine a first time offset;

running the precision time protocol between the second virtual machine and the second computing system to determine a second time offset; and

determining the time offset as a difference between the first time offset and the second time offset.

5 . The method of claim 1 , wherein determining the time offset further comprises:

initializing communications channels to the first virtual machine and to the second virtual machine;

measuring a delay time of the communications channels;

getting a first local time of the first virtual machine;

getting a local time of the second virtual machine;

getting a second local time of the first virtual machine; and

determining the time offset as the first local time of the first virtual machine plus the second local time of the first virtual machine minus twice the local time of the second virtual machine.

6 . The method of claim 1 , comprising storing, by the computing system, timestamps of traces based on the first virtual clock counter and the timestamps of traces based on the second virtual clock counter as adjusted according to the time offset, in a trace file.

7 . The method of claim 1 , comprising periodically repeating, by the computing system, the determining the time offset between the first virtual machine and the second virtual machine and the adjusting the timestamps of traces based on the second virtual clock counter.

8 . A computing system comprising:

a memory configured to store a first virtual clock counter of a first virtual machine and a second virtual clock counter of a second virtual machine; and

one or more programmable processors in communication with the memory and configured to:

determine a time offset between the first virtual clock counter and the second virtual clock counter;

store, in a memory page shared by the first virtual machine and the second virtual machine, information regarding the first virtual clock counter;

read the information regarding the first virtual clock counter; and

adjust, based on the information regarding the first virtual clock counter, timestamps of traces based on the second virtual clock counter according to the time offset.

9 . The computing system of claim 8 , wherein the one or more programmable processors are further configured to adjust the timestamps by subtracting the time offset from the timestamps.

10 . The computing system of claim 8 , wherein to determine the time offset the one or more programmable processors are further configured to run a precision time protocol between the first virtual machine and the second virtual machine.

11 . The computing system of claim 8 , wherein to determine the time offset, the one or more programmable processors are further configured to:

run a precision time protocol between the first virtual machine and a second computing system to determine a first time offset;

run the precision time protocol between the second virtual machine and the second computing system to determine a second time offset; and

determine the time offset as a difference between the first time offset and the second time offset.

12 . The computing system of claim 8 , wherein to determine the time offset, the one or more programmable processors are further configured to:

initialize communications channels to the first virtual machine and to the second virtual machine;

measure a delay time of the communications channels;

get a first local time of the first virtual machine;

get a local time of the second virtual machine;

get a second local time of the first virtual machine; and

determine the time offset as the first local time of the first virtual machine plus the second local time of the first virtual machine minus twice the local time of the second virtual machine.

13 . The computing system of claim 8 , wherein the one or more programmable processors are further configured to store, in a trace file in the memory, timestamps of traces based on the first virtual clock counter and the timestamps of traces based on the second virtual clock counter as adjusted according to the time offset.

14 . The computing system of claim 8 , wherein the one or more programmable processors are further configured to repeat the determining the time offset and the adjusting the timestamps of traces based on the second virtual clock counter.

15 . A non-transitory computer-readable storage medium encoded with instructions that, when executed by one or more processors of a computing system, cause the one or more processors to:

determine a time offset between a first virtual machine having a first virtual clock counter of the computing system and a second virtual machine having a second virtual clock counter of the computing system;

store, in a memory page shared by the first virtual machine and the second virtual machine, information regarding the first virtual clock counter;

read the information regarding the first virtual clock counter; and

adjust, based on the information regarding the first virtual clock counter, timestamps of traces based on the second virtual clock counter according to the time offset.

16 . The non-transitory computer-readable storage medium of claim 15 , wherein to adjust the timestamps of traces, the instructions further cause the one or more processors to subtract the time offset from the timestamps.

17 . The non-transitory computer-readable storage medium of claim 15 , wherein to determine the time offset, the instructions further cause the one or more processors to run a precision time protocol between the first virtual machine and the second virtual machine.

18 . The non-transitory computer-readable storage medium of claim 15 , wherein to determine the time offset, the instructions further cause the one or more processors to:

run a precision time protocol between the first virtual machine and a second computing system to determine a first time offset;

run the precision time protocol between the second virtual machine and the second computing system to determine a second time offset; and

determine the time offset as a difference between the first time offset and the second time offset.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 18, 2024
From: MA, XIAOQIN; GRANATA, ENRICO
To: GOOGLE LLC
Reel/Frame 068024/0539 →
Continuity (2)
Provisional Application 63581956 · Sep 11, 2023
Related Publication 20250085739A1 · Mar 13, 2025
References Cited (16)
US 6751573B1 · Burch · 2004 [cited by examiner]
US 8146078B2 · Bennett · 2012 [cited by examiner]
US 10860197B1 · Gibeau · 2020 [cited by examiner]
US 11481240B2 · Shamaiah · 2022 [cited by examiner]
US 20060225073A1 · Akagawa · 2006 [cited by examiner]
US 20110252266A1 · Costa · 2011 [cited by applicant]
US 20160112182A1 · Karnes · 2016 [cited by applicant]
US 20200218697A1 · Ghuge · 2020 [cited by examiner]
US 20210303021A1 · Cui · 2021 [cited by applicant]
US 20220350631A1 · Parry-barwick et al. · 2022 [cited by applicant]
“1588—IEEE Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems”, IEEE Standards, Nov. 8, 2019, 154 pp. [cited by applicant]
“Architecture”, Retrieved from: https://source.android.com/docs/automotive/virtualization/architecture, Accessed on: May 17, 2023, 12 pp. [cited by applicant]
Aring et al., “Bring network and time together using Linux tracing”, Retrieved from: chrome-extension://efaidnbmnnnibpcajpcglclefindmkaj/https://netdevconf.info/0x16/papers/7/aring_paper.pdf, Dec. 14, 2022, 7 pp. [cited by applicant]
Henderson, “Clock Synchronisation over Wi-Fi Networks”, Retrieved from: https://jackhenderson.com.au/projects/time-synchronisation, Accessed on: May 17, 2023, 12 pp. [cited by applicant]
Red Hat, “Virtualization Deployment and Administration Guide: Chapter 8”, Red Hat Enterprise Linux 7, Red Hat, Inc., Oct. 17, 2023, pp. 60-63, URL: https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/htm… [cited by applicant]
Wikipedia, “Precision Time Protocol”, Wikipedia, Wikimedia Foundation, Inc., 2024, 10 pp., Retrieved from the Internet on Jul. 18, 2024 from URL: https://en.wikipedia.org/wiki/Precision_Time_Protocol. [cited by applicant]