IP Library Granted Patent US 12,450,040
Granted Patent B2
US 12,450,040 · App. 18/133,190 · Granted Oct 21, 2025

Framework for user-directed profile-driven optimizations

Inventors: Teresa Louise Johnson (Los Gatos, CA); Xinliang David Li (Palo Alto, CA)
Assignee: Google LLC
G06F8/443G06F8/4434G06F8/4441
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,450,040
App. No.
18/133,190
Granted
Oct 21, 2025
Kind
B2
Abstract

A method for using profiling to obtain application-specific, preferred parameter values for an application is disclosed. First, a parameter for which to obtain an application-specific value is identified. Code is then augmented for application-specific profiling of the parameter. The parameter is profiled and profile data is collected. The profile data is then analyzed to determine the application's preferred parameter value for the profile parameter.

Claims (35)

1. A method for using profiling to determine application-specific values for an application, the method comprising:

receiving, by a computer, identification of one or more user-directed application-specific parameters for which to obtain at least one application-specific value;

collecting, by the computer, profile data by running a user-defined profile update function having a user-defined counter variable to update a counter for the one or more user-directed application-specific parameters, wherein the profile update function is run in a code location where a value of the counter is updated;

analyzing, by the computer, the profile data using a set of standard value profile transformations to determine the at least one application-specific value, wherein the set of standard value profile transformations are specified in user-directed value transformation support interfaces; and

generating, by the computer, an optimized binary utilizing the at least one application-specific value.

2. The method of claim 1 , further comprising:

generating, by the computer, an instrumentation binary from an instrumentation build; and

executing, by the computer, a training run using the instrumentation build.

3. The method of claim 1 , further comprising profiling, by the computer, the one or more user-directed application-specific parameters.

4. The method of claim 3 , wherein the profiling is one of per-class global value profiling, per-site value profiling, or per-site object value profiling.

5. The method of claim 3 , wherein profiling the one or more user-directed application-specific parameters further comprises initializing a counter within a user-defined profile instrumentation initialization routine.

6. The method of claim 5 , wherein the counter is allocated to one entry in a static counter array using a compiler extension.

7. The method of claim 1 , wherein the set of standard value profile transformations are provided in one or more compiler support libraries.

8. The method of claim 1 , further comprising running, by the computer, a defined analysis callback routine to record a preferred parameter value of the one or more user-directed application-specific parameters.

9. A system comprising:

one or more processors; and

one or more storage devices coupled to the one or more processors and storing instructions that, when executed by the one or more processors, cause the one or more processors to perform operations for using profiling to determine application-specific values for an application, the operations comprising:

receiving identification of one or more user-directed application-specific parameters for which to obtain at least one application-specific value;

collecting profile data by running a user-defined profile update function having a user-defined counter variable to update a counter for the one or more user-directed application-specific parameters, wherein the profile update function is run in a code location where a value of the counter is updated;

analyzing the profile data using a set of standard value profile transformations to determine the at least one application-specific value, wherein the set of standard value profile transformations are specified in user-directed value transformation support interfaces; and

generating an optimized binary utilizing the at least one application-specific value.

10. The system of claim 9 , wherein the operations further comprise:

generating an instrumentation binary from an instrumentation build; and

executing a training run using the instrumentation build.

11. The system of claim 9 , wherein the operations further comprise profiling the one or more user-directed application-specific parameters.

12. The system of claim 11 , wherein profiling the one or more user-directed application-specific parameters further comprises initializing a counter within a user-defined profile instrumentation initialization routine.

13. The system of claim 9 , wherein the set of standard value profile transformations are provided in one or more compiler support libraries.

14. The system of claim 9 , wherein the operations further comprise running a defined analysis callback routine to record a preferred parameter value of the one or more user-directed application-specific parameters.

15. A non-transitory computer readable medium for storing instructions that, when executed by one or more processors, cause the one or more processors to perform operations for using profiling to determine application-specific values for an application, the operations comprising:

receiving identification of one or more user-directed application-specific parameters for which to obtain at least one application-specific value;

collecting profile data by running a user-defined profile update function having a user-defined counter variable to update a counter for the one or more user-directed application-specific parameters, wherein the profile update function is run in a code location where a value of the counter is updated;

analyzing the profile data using a set of standard value profile transformations to determine the at least one application-specific value, wherein the set of standard value profile transformations are specified in user-directed value transformation support interfaces; and

generating an optimized binary utilizing the at least one application-specific value.

16. The non-transitory computer readable medium of claim 15 , wherein the operations further comprise profiling the one or more user-directed application-specific parameters.

17. The non-transitory computer readable medium of claim 16 , wherein profiling the one or more user-directed application-specific parameters further comprises initializing a counter within a user-defined profile instrumentation initialization routine.

Assignments (2)
CHANGE OF NAME Recorded Apr 13, 2023
From: GOOGLE INC.
To: GOOGLE LLC
Reel/Frame 063327/0496 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 12, 2023
From: JOHNSON, TERESA LOUISE; LI, XINLIANG DAVID
To: GOOGLE INC.
Reel/Frame 063298/0951 →
Continuity (5)
Continuation 17697119 · Mar 17, 2022
Continuation 16524929 · Jul 29, 2019
Continuation 15701296 · Sep 11, 2017
Continuation 13855557 · Apr 2, 2013
Related Publication 20230244458A1 · Aug 3, 2023
References Cited (43)
US 6374369B1 · O'Donnell · 2002 [cited by examiner]
US 6668372B1 · Wu · 2003 [cited by examiner]
US 8387026B1 · Hundt et al. · 2013 [cited by applicant]
US 8627300B2 · Kruglick · 2014 [cited by applicant]
US 8635606B2 · Kruglick · 2014 [cited by applicant]
US 20050050532A1 · Matsuyama · 2005 [cited by applicant]
US 20050086650A1 · Yates · 2005 [cited by applicant]
US 20050125784A1 · Yang et al. · 2005 [cited by applicant]
US 20060059474A1 · Bhansali et al. · 2006 [cited by applicant]
US 20060242636A1 · Chilimbi et al. · 2006 [cited by applicant]
US 20070061785A1 · Prakash · 2007 [cited by examiner]
US 20080126867A1 · Pandarinathan et al. · 2008 [cited by applicant]
US 20080168433A1 · Arnold · 2008 [cited by applicant]
US 20080282232A1 · Cong et al. · 2008 [cited by applicant]
US 20090089805A1 · Srinivasan · 2009 [cited by applicant]
US 20100088684A1 · Gulwani · 2010 [cited by examiner]
US 20100125838A1 · Kuusilinna · 2010 [cited by applicant]
US 20110016289A1 · Ableidinger · 2011 [cited by examiner]
US 20120278793A1 · Jalan et al. · 2012 [cited by applicant]
US 20140047420A1 · Pizlo · 2014 [cited by applicant]
CN 102609351A · 2012 [cited by applicant]
JP H09330233A · 1997 [cited by applicant]
JP H11149380A · 1999 [cited by applicant]
JP 2002099449A · 2002 [cited by applicant]
KR 20070038637A · 2007 [cited by applicant]
Arnold, Matthew. “Online profiling and feedback-directed optimization of java”, PHD Thesis. Rutgers, The State University of New Jersey, 2002. [cited by applicant]
International Search Report for International Application No. PCT/US2014/032530 mailed Sep. 12, 2014. [cited by applicant]
Invitation to Pay Additional Fees and, Where Applicable, Protest Fee mailed Jul. 17, 2014 for International Application No. PCT/US2014/032530. [cited by applicant]
Kishnaswamy, A. et al., “Profile Guided Selection of ARM and Thumb Instructions”, Association for Computing Machinery, ACM Press, vol. 37, No. 7, Jul. 1, 2002, pp. 56-64. [cited by applicant]
Notice of Allowance dated Apr. 28, 2017 in Korean Patent Application No. 10-2015-7030905. [cited by applicant]
Office Action dated Feb. 3, 2017 in European Patent Application No. 14724894.2 (3 pages). [cited by applicant]
Office Action dated Jan. 20, 2017 in Korean Patent Application No. 10-2015-7030905 (16 pages). [cited by applicant]
Office Action dated Jan. 4, 2019 in Chinese Patent Application No. 2014800198063, and English translation thereof. [cited by applicant]
Office Action dated Oct. 18, 2016 in corresponding Japanese Patent Application No. 2016-506373. [cited by applicant]
Office Action dated Oct. 20, 2016 in corresponding Korean Patent Application No. 10-2015-7030905. [cited by applicant]
Office Action dated Sep. 1, 2016 in European Patent Application No. 14724894.2 (4 pages). [cited by applicant]
Office Action dated Sep. 9, 2016 in Australian Patent Application No. 2014248296 (3 pages). [cited by applicant]
Office Action for Brazilian Patent Application No. 1120150243347 dated Mar. 6, 2020. 4 pages. [cited by applicant]
Patent Examination Report No. 1 dated Jun. 3, 2016 in corresponding Australian Application No. 2014248296. [cited by applicant]
Ramasamy, V. et al., Feedback-directed Optimizations in GCC with Estimated Edge Profiles from Hardware Event Sampling, reprinted from Proceedings of the GCC developers' Summit, Jun. 17-19, 2008, Ottowa, Ontario CA, pp. … [cited by applicant]
Sato, et al., “Automatic Adaptive Performance Tuning Tool, TEA Expert”, Research Report of Information Processing Society of Japan, Japan, Information Processing Society of Japan, Aug. 7, 1998, vol. 98, No. 72, pp. 13-1… [cited by applicant]
Takbayashi, et al., “Binary Hacks: Hackers' 100 Secret Techniques”, Japan, O'Reilly Japan Inc., Nov. 8, 2006, First Edition, pp. 81, 83 and 300-302. [cited by applicant]
Written Opinion of International Searching Authority for International Application No. PCT/US2014/032530 mailed Sep. 12, 2014. [cited by applicant]