Modification of context saving functions

US10496433B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-10496433-B2
Application numberUS-201414552394-A
CountryUS
Kind codeB2
Filing dateNov 24, 2014
Priority dateNov 24, 2014
Publication dateDec 3, 2019
Grant dateDec 3, 2019

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

A method for modifying a context saving function is disclosed. The method identifies a context saving function within a code fragment. The method further modifies the context saving function to determine a size of a register save buffer, allocate the register save buffer using the determined size, and save a register value in the register save buffer.

First claim

Opening claim text (preview).

What is claimed is: 1. A method comprising: identifying a context saving function within a code fragment; and modifying, by a processing device, a portion of the code fragment corresponding to the context saving function to generate a modified context saving function to: determine a size of a register save buffer where a register value indicative of a process state of a processing unit is stored in the register save buffer responsive to an execution of the context saving function; allocate the register save buffer using the determined size; save the register value in the register save buffer, wherein the register value is to restore the process state of the processing unit; and provide an indication of the context saving function having been modified, wherein the modified context saving function allows the context saving function associated with a fixed-size register save buffer used by a first processing architecture of the processing unit to be used by a second processing architecture that uses one or more additional processing unit registers. 2. The method of claim 1 , wherein modifying the context saving function further comprises: inserting a function call to receive an indication of the size of the register save buffer. 3. The method of claim 1 , wherein modifying the context saving function further comprises: modifying an initial part of a context switch to: allocate the register save buffer; and call a first system call to save process state data to the register save buffer. 4. The method of claim 1 , wherein modifying the context saving function further comprises: modifying a final part of a context switch to: call a second system call to restore the process state data from the register save buffer. 5. The method of claim 1 , wherein the register save buffer is an additional register save buffer distinct from the fixed-size register save buffer associated with the context switching function, and wherein the processing device is the same as the processing unit. 6. The method of claim 1 , wherein identifying the context saving function within a code fragment further comprises: identifying an attribute of the code fragment indicating that the code fragment comprises a context switching function. 7. The method of claim 1 , wherein the code fragment comprises at least one of a source code, compiler-internal data structure, or an executable code. 8. The method of claim 1 , wherein modifying the context saving function is performed by a compiler. 9. The method of claim 1 , wherein modifying the context saving function is performed as a post-processing operation following a compilation. 10. A system comprising: a memory; and a processing device, operatively coupled with the memory, to: identify a context saving function within a code fragment; and modify a portion of the code fragment corresponding to the context saving function to generate a modified context saving function to: determine a size of a register save buffer where a register value indicative of a process state of a processing unit is stored in the register save buffer responsive to an execution of the context saving function; allocate the register save buffer using the determined size; save the register value in the register save buffer, wherein the register value is to restore the process state of the processing unit; and provide an indication of the context saving function having been modified, wherein the modified context saving function allows the context saving function associated with a fixed-size register save buffer used by a first processing architecture of the processing unit to be used by a second processing architecture that uses one or more additional processing unit registers. 11. The system of claim 10 , wherein the processing device is further to: insert a function call to determine the size of the register save buffer. 12. The system of claim 10 , wherein the processing device is further to: modify an initial part of a context switch to: allocate the register save buffer; and call a first system call to save process state data to the register save buffer. 13. The system of claim 10 , wherein the processing device is further to: modify a final part of a context switch to: call a second system call to restore the process state data from the register save buffer. 14. A non-transitory computer readable storage medium including instructions that, when executed by a processing device, cause the processing device to: identify a context saving function within a code fragment; and modify, by the processing device, a portion of the code fragment corresponding to the context saving function to generate a modified context saving function to: determine a size of a register save buffer where a register value of a process state of a processing unit is stored in the register save buffer responsive to an execution of the context saving function; allocate the register save buffer using the determined size; save the register value in the register save buffer, wherein the register value is to restore the process state of the processing unit; and provide an indication of the context saving function having been modified, wherein the modified context saving function allows the context saving function associated with a fixed-size register save buffer used by a first processing architecture of the processing unit to be used by a second processing architecture that uses one or more additional processing unit registers. 15. The non-transitory computer readable storage medium of claim 14 , wherein to modify the context saving function, the processing device is to: insert a function call to receive the size of the register save buffer; modify an initial part of a context switch to: allocate the register save buffer; and call a first system call to save process state data to the register save buffer; and modify a final part of a context switch to: call a second system call to restore the process state data from the register save buffer.

Assignees

Inventors

Classifications

  • Adapting program code to run in a different environment; Porting · CPC title

  • Remote procedure calls [RPC]; Web services · CPC title

  • G06F9/461Primary

    Saving or restoring of program or task context · CPC title

  • Performance evaluation by tracing or monitoring · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US10496433B2 cover?
A method for modifying a context saving function is disclosed. The method identifies a context saving function within a code fragment. The method further modifies the context saving function to determine a size of a register save buffer, allocate the register save buffer using the determined size, and save a register value in the register save buffer.
Who is the assignee on this patent?
Red Hat Inc
What technology area does this patent fall under?
Primary CPC classification G06F9/461. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Dec 03 2019 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 8 related publications on this page (citations in our corpus or others sharing the same primary CPC).