Memory access instruction instrumentation optimization method in multi-thread application scene

A multi-threaded application and optimization method technology, which is applied in the field of memory access instruction instrumentation optimization in multi-threaded application scenarios, can solve the problems of reducing the cost of instrumentation, decreased accuracy, and lack of versatility, so as to reduce overhead and scale , high versatility

Active Publication Date: 2019-08-30
UNIV OF SCI & TECH OF CHINA
View PDF7 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, sampling methods usually need to make a trade-off between accuracy and performance overhead, which may reduce the accuracy while reducing the cost of instrumentation
Moreover, sampling strategies usually depend on specific tasks, and some sampling methods also require additional hardware platform support, so they lack versatility to a certain extent.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0053] In this embodiment, a memory access instruction instrumentation optimization method in a multi-threaded application scenario is to eliminate redundant instrumentation of memory access instructions involving non-shared memory through a static analysis process based on program intermediate code, specifically , proceed as follows:

[0054] Step 1: Based on the open source LLVM compiler framework, compile the source program and obtain platform-independent intermediate code;

[0055] Step 2: traverse the modules contained in the intermediate code, obtain all functions from all modules, and then obtain all basic blocks from all functions, and execute steps 3 and 4 one by one for the instructions contained in all basic blocks;

[0056] Step 3: Obtain information about the current instruction based on the LLVM instruction type system and the provided interfaces getOperand() and isPointerOperand(), including: instruction type, instruction operand, and operand type;

[0057] Ste...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a memory access instruction instrumentation optimization method in a multi-thread application scene, redundant instrumentation of a memory access instruction involving a non-shared memory is removed through a static analysis process based on a program intermediate code, and the method specifically comprises the following steps: 1, obtaining the intermediate code; 2, traversing all modules, functions, basic blocks and instructions; 3, acquiring instruction related information, and updating and recording distinguishing information of redundant / non-redundant instrumentation according to corresponding rules; and 4, selectively instrumenting the memory access instruction according to the recorded distinguishing information. According to the method, the problem of instrumentation redundancy in a traditional memory access instruction instrumentation method can be solved, and the purposes of reducing the memory access instruction instrumentation scale and the operationoverhead introduced by instrumentation are achieved.

Description

technical field [0001] The invention belongs to the technical field of performance optimization in memory access behavior monitoring, and specifically relates to a memory access instruction stub optimization method in a multi-thread application scenario. Background technique [0002] In various application scenarios for multi-threaded programs, the memory access behavior of monitoring programs is very important. For example, the detection of concurrency vulnerabilities depends on the tracking and analysis of program access to shared memory. Instrumentation is an effective means of grabbing memory access information, by inserting "probes" (usually code segments containing function calls) into the source program, and throwing out the characteristics of the program runtime through the execution of the probes information (here specifically refers to the memory access behavior information), so as to realize the recording and analysis of the memory access behavior information in ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F8/41
CPCG06F8/443G06F8/4441
Inventor 顾乃杰刘倩玉苏俊杰
Owner UNIV OF SCI & TECH OF CHINA
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products