US2023325161A1PendingUtilityA1

Profiling and optimization of compiler-generated code

Assignee: RED HAT INCPriority: Apr 27, 2021Filed: Jun 2, 2023Published: Oct 12, 2023
Est. expiryApr 27, 2041(~14.7 yrs left)· nominal 20-yr term from priority
Inventors:Ulrich Drepper
G06F 8/443G06F 8/43
69
PatentIndex Score
0
Cited by
0
References
0
Claims

Abstract

The technology disclosed herein enables a processing device to receive program code comprising a plurality of program code instructions, wherein the plurality of program code instructions comprise at least one profiling instruction, wherein the program code is loaded from an executable program file that specifies a persistent memory region; and execute the program code including the at least one profiling instruction, wherein to execute the at least one profiling instruction, the processing device is to: identify a memory location in the persistent memory region in view of a profiling identifier included in the at least one profiling instruction, generate a profiling information item, and store the profiling information item in the persistent memory region at the identified memory location.

Claims

exact text as granted — not AI-modified
What is claimed is: 
     
         1 . A method comprising:
 receiving, by a processing device, program code comprising a plurality of program code instructions, wherein the plurality of program code instructions comprise at least one profiling instruction, wherein the program code is loaded from an executable program file that specifies a persistent memory region; and   executing the program code including the at least one profiling instruction, wherein executing the at least one profiling instruction comprises:
 identifying a memory location in the persistent memory region in view of a profiling identifier included in the at least one profiling instruction, 
 generating a profiling information item, and 
 storing the profiling information item in the persistent memory region at the identified memory location. 
   
     
     
         2 . The method of  claim 1 , further comprising:
 receiving, from an operating system kernel, a pointer to the persistent memory region.   
     
     
         3 . The method of  claim 2 , wherein identifying the memory location in the persistent memory region comprises:
 determining the memory location as a sum of the pointer to the persistent memory region and an offset determined in view of the profiling identifier.   
     
     
         4 . The method of  claim 1 , wherein identifying the memory location in the persistent memory region comprises:
 determining a product of the profiling identifier and a size of the profiling information item.   
     
     
         5 . The method of  claim 1 , wherein the at least one profiling instruction is associated with a parameter that specifies a particular memory location, and wherein generating the profiling information item further comprises:
 reading the value of the particular memory location;   generating at least one result value in view of the value of the particular memory location; and   storing the at least one result value at the identified memory location.   
     
     
         6 . The method of  claim 5 , wherein storing the at least one result value at the identified memory location further comprises:
 determining whether a condition associated with the at least one profiling instruction is satisfied; and   responsive to determining that the condition is satisfied, storing the at least one result value at the identified memory location.   
     
     
         7 . The method of  claim 1 , wherein the profiling information item comprises a plurality of counter values, and wherein generating the profiling information item further comprises:
 incrementing each counter value of the plurality of counter values in response to a condition associated with the respective counter value being satisfied.   
     
     
         8 . A system comprising:
 a memory; and   a processing device operatively coupled to the memory, wherein the processing device processes instructions synchronously in accordance with a processor clock, the processing device to:
 receive program code comprising a plurality of program code instructions, wherein the program code instructions comprise at least one profiling instructions, wherein the program code is loaded from an executable program file that specifies a persistent memory region; and 
 execute the program code including the at least one profiling instruction included in the program code, wherein to execute the profiling instruction, the processing device is to:
 identify a memory location in the persistent memory region in view of a profiling identifier included in the profiling instruction, 
 generate a profiling information item, and 
 store the profiling information item in the persistent memory region at the identified memory location. 
 
   
     
     
         9 . The system of  claim 8 , wherein the processing device is further to:
 receive, from an operating system kernel, a pointer to the persistent memory region.   
     
     
         10 . The system of  claim 9 , wherein to identify the memory location in the persistent memory region, the processing device is to:
 determine the identified memory location as a sum of the pointer to the persistent memory region and an offset determined in view of the profiling identifier.   
     
     
         11 . The system of  claim 8 , wherein to identify the memory location in the persistent memory region, the processing device is to:
 determine a product of the profiling identifier and a size of the profiling information item.   
     
     
         12 . The system of  claim 8 , wherein the profiling instruction is associated with a parameter that specifies a particular memory location, and to generate a profiling information item, the processing device is further to:
 read the value of a particular memory location;   generate at least one result value in view of the value of the particular memory location; and   store the at least one result value at the identified memory location.   
     
     
         13 . The system of  claim 12 , wherein to store the at least one result value at the identified memory location, the processing device is further to:
 determine whether a condition associated with the profiling instruction is satisfied; and   responsive to determining that the condition is satisfied, store the at least one result value at the identified memory location.   
     
     
         14 . The system of  claim 8 , wherein the profiling information item comprises a plurality of counter values, and to generate a profiling information item, the processing device is further to:
 increment each counter value in response to a condition associated with the counter value being satisfied.   
     
     
         15 . A non-tangible, computer-readable medium storing instructions that, when executed by a processing device, cause the processing device to:
 receive program code comprising a plurality of program code instructions, wherein the program code instructions comprise at least one profiling instructions, wherein the program code is loaded from an executable program file that specifies a persistent memory region; and   execute the program code including the at least one profiling instruction included in the program code, wherein to execute the profiling instruction, the processing device is to:
 identify a memory location in the persistent memory region in view of a profiling identifier included in the profiling instruction, 
 generate a profiling information item, and 
 store the profiling information item in the persistent memory region at the identified memory location. 
   
     
     
         16 . The computer-readable medium of  claim 15 , wherein the processing device is further to:
 receive, from an operating system kernel, a pointer to the persistent memory region.   
     
     
         17 . The computer-readable medium of  claim 16 , wherein to identify the memory location in the persistent memory region, the processing device is to:
 determine the memory location as a sum of the pointer to the persistent memory region and an offset determined in view of the profiling identifier.   
     
     
         18 . The computer-readable medium of  claim 15 , wherein to identify the memory location in the persistent memory region, the processing device is to:
 determine a product of the profiling identifier and a size of the profiling information item.   
     
     
         19 . The computer-readable medium of  claim 15 , wherein the at least one profiling instruction is associated with a parameter that specifies a particular memory location, and to generate the profiling information item, the processing device is further to:
 read the value of the particular memory location;   generate at least one result value in view of the value of the particular memory location; and   store the at least one result value at the identified memory location.   
     
     
         20 . The computer-readable medium of  claim 19 , wherein to store the at least one result value at the identified memory location, the processing device is further to:
 determine whether a condition associated with the at least one profiling instruction is satisfied; and   responsive to determining that the condition is satisfied, store the at least one result value at the identified memory location.

Join the waitlist — get patent alerts

Track US2023325161A1 — get alerts on status changes and closely related new filings.

We store only your email — no account needed. See our privacy policy.