IP Library Granted Patent US 11,010,158
Granted Patent B2
US 11,010,158 · App. 15/814,156 · Granted May 18, 2021

Determining the availability of memory optimizations by analyzing a running binary

Inventors: Jason P. Rahman (Seattle, WA); Daniel J. Reif (Mountain View, CA)
Assignee: Facebook, Inc.
G06F8/77G06F3/0604G06F3/0653G06F3/0673
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 11,010,158
App. No.
15/814,156
Granted
May 18, 2021
Kind
B2
Abstract

A copy of memory data content in at least a portion of computer memory utilized by a computer process during execution is obtained. An entropy of at least a portion of the obtained memory data content is determined. A memory data entropy metric based at least in part on the determined entropy of at least the portion of the obtained memory data content is calculated and a computer code portion associated with the memory data entropy metric is identified.

Claims (35)

1. A method comprising:

obtaining a memory image of memory data content in at least a portion of computer memory utilized by a computer process during execution;

determining an entropy associated with data redundancy of at least a portion of the obtained memory image of memory data content of a running binary;

calculating a memory data entropy metric based at least in part on the determined entropy of at least the portion of the obtained memory image of the memory data content;

determining based on an analysis of the memory data entropy metric whether the memory data entropy metric indicates that a memory segment of the obtained memory image of the memory data content stores redundant or duplicate data; and

in response to determining that the memory segment stores the redundant or duplicate data, identifying a computer code portion associated with the memory segment that stores the redundant or duplicate data.

2. The method of claim 1 , wherein the computer code portion associated with the memory segment that stores the redundant or duplicate data was identified in response to a determination that the memory data entropy metric meets a criterion.

3. The method of claim 2 , wherein the criterion is based on an entropy threshold range.

4. The method of claim 1 , wherein the at least portion of the obtained memory image of memory data content corresponds to a text segment, a data segment, a stack segment, or a heap segment of the computer process.

5. The method of claim 1 , wherein calculating the memory data entropy metric utilizes a compression algorithm.

6. The method of claim 1 , wherein calculating the memory data entropy metric is based on a configuration that includes settings for enabling or disabling copy-on-write memory portions, shared memory segments, or memory-mapped files.

7. The method of claim 1 , wherein the calculating of the memory data entropy metric is performed using a continuous integration environment.

8. The method of claim 1 , wherein the calculating of the memory data entropy metric is performed from a perspective of an operating system kernel.

9. The method of claim 1 , wherein the calculating of the memory data entropy metric utilizes an operating system kernel hook.

10. The method of claim 1 , further comprising performing a baseline entropy evaluation.

11. The method of claim 10 , wherein the baseline entropy evaluation utilizes a non-trivial binary created using similar design principles as the computer process.

12. The method of claim 10 , wherein the baseline entropy evaluation utilizes a running environment matching the computer process.

13. The method of claim 10 , wherein calculating the memory data entropy metric further comprises comparing the memory data entropy metric to the baseline entropy evaluation.

14. The method of claim 1 , further comprising storing the memory data entropy metric and a commit identifier corresponding to a source code change for the computer process in a database.

15. The method of claim 1 , wherein identifying the computer code portion associated with the memory segment that stores the redundant or duplicate data utilizes an object to memory mapping.

16. The method of claim 1 , wherein identifying the computer code portion associated with the memory segment that stores the redundant or duplicate data utilizes a garbage collection data structure.

17. The method of claim 1 , wherein calculating the memory data entropy metric utilizes a dictionary based on a memory segment type.

18. The method of claim 17 , wherein the memory segment type includes one of a text segment, a data segment, a stack segment, or a heap segment.

19. A system comprising: a processor; and a memory coupled with the processor, wherein the memory is configured to provide the processor with instructions which when executed cause the processor to:

obtain a memory image of memory data content in at least a portion of computer memory utilized by a computer process during execution;

determine an entropy associated with data redundancy of at least a portion of the obtained memory image of memory data content of a running binary;

calculate a memory data entropy metric based at least in part on the determined entropy of at least the portion of the obtained memory image of the memory data content;

determine based on an analysis of the memory data entropy metric whether the memory data entropy metric indicates that a memory segment of the obtained memory image of the memory data content stores redundant or duplicate data; and

in response to determining that the memory segment stores the redundant or duplicate data, identify a computer code portion associated with the memory segment that stores the redundant or duplicate data.

20. A computer program product, the computer program product being embodied in a non-transitory computer readable storage medium and comprising computer instructions for:

obtaining a memory image of memory data content in at least a portion of computer memory utilized by a computer process during execution;

determining an entropy associated with data redundancy of at least a portion of the obtained memory image of memory data content of a running binary;

calculating a memory data entropy metric based at least in part on the determined entropy of at least the portion of the obtained memory image of the memory data content;

determining based on an analysis of the memory data entropy metric whether the memory data entropy metric indicates that a memory segment of the obtained memory image of the memory data content stores redundant or duplicate data; and

in response to determining that the memory segment stores the redundant or duplicate data, identifying a computer code portion associated with the memory segment that stores the redundant or duplicate data.

Assignments (2)
CHANGE OF NAME Recorded Nov 19, 2021
From: FACEBOOK, INC.
To: META PLATFORMS, INC.
Reel/Frame 058214/0351 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 21, 2017
From: RAHMAN, JASON P.; REIF, DANIEL J.
To: FACEBOOK, INC.
Reel/Frame 044462/0241 →
Continuity (1)
Related Publication 20190146786A1 · May 16, 2019