IP Library Granted Patent US 10,834,255
Granted Patent B1
US 10,834,255 · App. 16/748,734 · Granted Nov 10, 2020

Target injection safe method for inlining large call tables

Inventors: Nadav Amit (Mountain View, CA); Frederick Joseph Jacobs (Los Gatos, CA); Michael Wei (Palo Alto, CA)
Assignee: VMware, Inc.
H04M3/42221H04M3/42059H04M3/5175H04M3/5191H04M3/523
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 10,834,255
App. No.
16/748,734
Granted
Nov 10, 2020
Kind
B1
Abstract

A method redirecting an indirect call in a call table to direct call includes the steps of: recording frequencies of calls in a frequency table; updating a search trampoline to cache, as direct calls, calls of the call table that are most frequently made according to the recorded calls in the frequency table; receiving a request to perform one of the calls in the call table; performing a search of the search trampoline to determine whether or not the requested call is cached in the search trampoline; if the requested call is cached in the search trampoline, performing the requested call that is cached in the search trampoline; and if the requested call is not cached in the search trampoline, performing the requested call by accessing the call via the call table.

Claims (47)

1. A method of redirecting an indirect call in a call table to direct call, the method comprising:

recording frequencies of calls in a frequency table;

updating a search trampoline to cache, as direct calls, calls of the call table that are most frequently made according to the recorded calls in the frequency table;

receiving a request to perform one of the calls in the call table;

performing a search of the search trampoline to determine whether or not the requested call is cached in the search trampoline;

if the requested call is cached in the search trampoline, performing the requested call that is cached in the search trampoline; and

if the requested call is not cached in the search trampoline, performing the requested call by accessing the call via the call table.

2. The method of claim 1 , wherein recording frequencies of calls in a table includes:

recording frequencies of calls in a per-CPU table; and

aggregating the calls in the per-CPU table into a per-process table.

3. The method of claim 2 , wherein aggregating the calls into the per-process table occurs when a process context switch occurs.

4. The method of claim 2 , wherein a learning mode is set when a thread of a process is scheduled.

5. The method of claim 4 , wherein the learning mode is set after a time interval lapses.

6. The method of claim 1 , wherein the search trampoline caches four direct calls.

7. The method of claim 1 , wherein the search trampoline is implemented as an instance trampoline.

8. A system comprising:

a memory containing one or more user processes, and an operating system kernel having a memory code region that has a different mapping for each user process; and

one or more CPUs coupled to the memory, the one or more CPUs running the operating system kernel and the one or more user processes;

wherein the operating system kernel is configured to:

record frequencies of calls in a frequency table;

update a search trampoline to cache, as direct calls, calls of the call table that are most frequently made according to the recorded calls in the frequency table;

receive a request to perform one of the calls in the call table;

perform a search of the search trampoline to determine whether or not the requested call is cached in the search trampoline;

if the requested call is cached in the search trampoline, perform the requested call that is cached in the search trampoline; and

if the requested call is not cached in the search trampoline, perform the requested call by accessing the call via the call table.

9. The system of claim 8 , wherein being configured to record frequencies of calls in a table includes being configured to:

record frequencies of calls in a per-CPU table; and

aggregate the calls in the per-CPU table into a per-process table.

10. The system of claim 9 , wherein being configured to aggregate the calls into the per-process table includes aggregating the calls when a process context switch occurs.

11. The system of claim 9 , wherein a learning mode is set when a thread of a process is scheduled.

12. The system of claim 11 , wherein the learning mode is set after a time interval lapses.

13. The system of claim 8 , wherein the search trampoline caches four direct calls.

14. The system of claim 8 , wherein the search trampoline is implemented as an instance trampoline.

15. A non-transitory computer-readable medium comprising instructions executable in a computer system, wherein the instructions when executed in the computer system cause the computer system to carry out a method of redirecting an indirect call in a call table to a direct call, the method comprising:

recording frequencies of calls in a frequency table;

updating a search trampoline to cache, as direct calls, calls of the call table that are most frequently made according to the recorded calls in the frequency table;

receiving a request to perform one of the calls in the call table;

performing a search of the search trampoline to determine whether or not the requested call is cached in the search trampoline;

if the requested call is cached in the search trampoline, performing the requested call that is cached in the search trampoline; and

if the requested call is not cached in the search trampoline, performing the requested call by accessing the call via the call table.

16. The non-transitory computer-readable medium of claim 15 , wherein recording frequencies of calls in a table includes:

recording frequencies of calls in a per-CPU table; and

aggregating the calls in the per-CPU table into a per-process table.

17. The non-transitory computer-readable medium of claim 16 , wherein aggregating the calls into the per-process table occurs when a process context switch occurs.

18. The non-transitory computer-readable medium of claim 16 , wherein a learning mode is set when a thread of a process is scheduled.

19. The non-transitory computer-readable medium of claim 18 , wherein the learning mode is set after a time interval lapses.

20. The non-transitory computer-readable medium of claim 15 , wherein the search trampoline is implemented as an instance trampoline.

Assignments (2)
CHANGE OF NAME Recorded Apr 15, 2024
From: VMWARE, INC.
To: VMWARE LLC
Reel/Frame 067103/0030 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 13, 2020
From: AMIT, NADAV; JACOBS, FREDERICK JOSEPH; WEI, MICHAEL
To: VMWARE, INC.
Reel/Frame 052113/0601 →