Long-Term Supported Versions

    Installation and Deployment

    Software

    • OS: openEuler 22.03 LTS SP2

    Hardware

    • x86_64
    • AArch64

    Preparing the Environment

    Install the dependency

    Installing the Software on Which the PIN GCC Client Depends

    yum install -y git
    yum install -y make
    yum install -y cmake
    yum install -y grpc
    yum install -y grpc-devel
    yum install -y grpc-plugins
    yum install -y protobuf-devel
    yum install -y jsoncpp
    yum install -y jsoncpp-devel
    yum install -y gcc-plugin-devel
    yum install -y llvm-mlir
    yum install -y llvm-mlir-devel
    yum install -y llvm-devel
    

    Installing the Software on Which the PIN Server Depends

    yum install -y git
    yum install -y make
    yum install -y cmake
    yum install -y grpc
    yum install -y grpc-devel
    yum install -y grpc-plugins
    yum install -y protobuf-devel
    yum install -y jsoncpp
    yum install -y jsoncpp-devel
    yum install -y llvm-mlir
    yum install -y llvm-mlir-devel
    yum install -y llvm-devel
    

    Installing PIN

    Performing Installation

    Installing the PIN GCC Client

    yum install -y pin-gcc-client
    

    Installing the PIN Server

    yum install -y pin-server
    

    Build

    Building the PIN GCC Client

    git clone https://gitee.com/openeuler/pin-gcc-client.git
    cd pin-gcc-client
    mkdir build
    cd build
    cmake ../ -DMLIR_DIR=${MLIR_PATH} -DLLVM_DIR=${LLVM_PATH}
    make
    

    Building the PIN Server

    git clone https://gitee.com/openeuler/pin-server.git
    cd pin-server
    mkdir build
    cd build
    cmake ../ -DMLIR_DIR=${MLIR_PATH} -DLLVM_DIR=${LLVM_PATH}
    make
    

    Usage

    You can use -fplugin and -fplugin-arg-libpin_xxx to enable the Plug-IN (PIN) tool. Command:

    $(TARGET): $(OBJS)
        $(CXX) -fplugin=${CLIENT_PATH}/libpin_gcc_client.so \
        -fplugin-arg-libpin_gcc_client-server_path=${SERVER_PATH}/pin_server \
        -fplugin-arg-libpin_gcc_client-log_level="1" \
        -fplugin-arg-libpin_gcc_client-arg1="xxx"
    

    You can use the ${INSTALL_PATH}/bin/pin-gcc-client.json file to configure PIN. The configuration options are as follows:

    • path: path of the executable file of the PIN server.
    • sha256file: path of the PIN verification file xxx.sha256.
    • timeout: timeout interval for cross-process communication, in milliseconds.

    Compile options:

    • -fplugin: path of the .so file of the PIN client.
    • -fplugin-arg-libpin_gcc_client-server_path: path of the executable program of the PIN server.
    • -fplugin-arg-libpin_gcc_client-log_level: default log level. The value ranges from 0 to 3. The default value is 1.
    • -fplugin-arg-libpin_gcc_client-argN: other parameters that can be specified as required. argN indicates the argument required by PIN.

    Compatibility

    This section describes the compatibility issues in some special scenarios. This project is in continuous iteration and will be fixed as soon as possible. Developers are welcome to join this project.

    • When PIN is enabled in the -flto phase, multi-process compilation using make -j is not supported. You are advised to use make -j1 for compilation.

    Bug Catching

    Buggy Content

    Bug Description

    Submit As Issue

    It's a little complicated....

    I'd like to ask someone.

    PR

    Just a small problem.

    I can fix it online!

    Bug Type
    Specifications and Common Mistakes

    ● Misspellings or punctuation mistakes;

    ● Incorrect links, empty cells, or wrong formats;

    ● Chinese characters in English context;

    ● Minor inconsistencies between the UI and descriptions;

    ● Low writing fluency that does not affect understanding;

    ● Incorrect version numbers, including software package names and version numbers on the UI.

    Usability

    ● Incorrect or missing key steps;

    ● Missing prerequisites or precautions;

    ● Ambiguous figures, tables, or texts;

    ● Unclear logic, such as missing classifications, items, and steps.

    Correctness

    ● Technical principles, function descriptions, or specifications inconsistent with those of the software;

    ● Incorrect schematic or architecture diagrams;

    ● Incorrect commands or command parameters;

    ● Incorrect code;

    ● Commands inconsistent with the functions;

    ● Wrong screenshots.

    Risk Warnings

    ● Lack of risk warnings for operations that may damage the system or important data.

    Content Compliance

    ● Contents that may violate applicable laws and regulations or geo-cultural context-sensitive words and expressions;

    ● Copyright infringement.

    How satisfied are you with this document

    Not satisfied at all
    Very satisfied
    Submit
    Click to create an issue. An issue template will be automatically generated based on your feedback.
    Bug Catching
    编组 3备份