clang plug-in instrumentation of llvm source code and analysis of function call logs (2)–google mirror

tick_plot__compile.ipynb clang plug-in instrumentation of llvm source code and analysis of function call logs (1) Analysis In and out, chain, out df in and out=df[ df[‘tickKind’].isin( [FuncEnter,FuncReturn] ) ] #In the code, only when the function enters, the chain length is calculated and written to the disk dfin=df[ df[‘tickKind’].isin( [FuncEnter] ) ] df chain=df in […]

clang plug-in instrumentation of llvm source code and analysis of function call logs (1)–google mirror

tick_plot__compile.ipynb Duration boundary_time chain anomaly: long and short function call chain list 0. Use matplotlib to find font files larger than 1MB in the system Chinese fonts are usually very large, so those filtered out usually have Chinese fonts. In the results, the name AR PL UMing CN’ is indeed a Chinese font. from matplotlib.font_manager […]

clang-query use

1.What is clang-query? clang-query is a command line interface tool based on the libclang library that can perform queries in the context of the Clang abstract syntax tree (AST), helping users understand the structure of the code. 2.What is the principle of clang-query? Use clang-query to first compile your source code through clang to generate […]

github, git, google: clang-front-end plug-in-add curly braces to various “blocks” without curly braces-based on llvm15–clang-plugin-add-brace—–google mirror

Processed statements case Terminology conventions or memos The starting and ending range of case: from the colon to the beginning of the next ‘case’, the abbreviation is: case inside, case content Ast: Abstract syntax tree: abstract syntax tree Case without curly braces If any of the following conditions are true in a case, the case […]

VSCode installation and usage of clang-format plug-in

VSCode installation and usage of clang-format plug-in 1. clang-format plug-in installation 2. Install the real formatting tool clang-format 3. Generate .clang-format configuration file and modify it 4. Modify configuration file 4.1 Global configuration file modification 4.2 Modification of workspace configuration file 5. Format code 1.clang-format plug-in installation Plug-in installation methods are divided into two types: […]

Android-NDK-clang compiles FFmpeg

Android-NDK-clang compiles FFmpeg Android-NDK-clang compiles FFmpeg Android-NDK-clang compiles FFmpeg – Zhihu (zhihu.com) Preliminary preparation Download Android-NDK Download FFmpeg source code Note: The author uses NDK-21 and ffmpeg-4.4 for compilation. It may be different if the versions are different. Test: NDK20 – NDK22 and ffmpeg 4.0 – ffmpeg 4.4 under mac and ubuntu can be used. […]

Format code with Clang-Format using the Visual Studio Code editor

Use the Visual Studio Code editor to format code with Clang-Format Article directory Format code with Clang-Format using the Visual Studio Code editor Preface 1. Install the plug-in 2. Configure the plug-in environment 1. Find the plugin path 2. Set up the plug-in environment 3. Fill in the plug-in tool path 4. Format document generation/production […]

VSCode displays “the clang format is not available” solution

Download LLVM in .vscode/settings.json Add the following code { “editor.formatOnSave”: true, “clang-format.executable”:”Fill in your bin path under LLVM /clang-format.exe” } Add the .clang-format configuration to the project root path. The following is copied. Language: Cpp # BasedOnStyle: LLVM # Offset of access specifiers (public, private, etc.) AccessModifierOffset: -2 # Alignment after opening brackets (opening round […]

Ubuntu download source code clang + llvm+lldb compile + install

[This article may involve installing the following tools on Ubuntu:]  A、g + + B. gcc C. make D. cmake E. clang(10.0.1)(required)  F, llvm(10.0.1)(required) G, lldb(10.0.1)(optional) H. libcxx(10.0.1)(required) I. libcxx abi(10.0.1)(required) J. compiler-rt (optional) 【Tired】 I currently have two virtual machines: A. Ubuntu [ubuntu-20.04.1-desktop-amd64.iso], B. fedora [Fedora-Workstation-Live-x86_64-32-1.6.iso]. A can share files with the physical machine normally, […]

Code formatting tool: clang-format

IDE: Visual Studio Code Language: C/C++ Formatting tool: clang-format Install vscodeInstall the extension C/C++ , the extension will automatically install clang-format: Configuration Preferences Open preferences Shortcut keys: Command + , Search clang-format to configure Configuration effective shortcut key Full-text formatting of the current file Shift + option + F Select block formatting Command + K […]