Файлы System/bin Android 12. Справочник.


  Все     Команда     Скрипт     Служба     Приложение  

bcc
Коллекция компиляторов BPF (BCC)

Тип файла: команда
  Рус  
usage:  bcc [subcommand] [options] <input bitcode files>


OPTIONS:

General options:

  • -C - Alias for -mtriple

  • -O=<char> - Optimization level. [-O0, -O1, -O2, or -O3] (default: -O3)

  • -aarch64-neon-syntax - Choose style of NEON code to emit from AArch64 backend: =generic - Emit generic NEON assembly =apple - Emit Apple-style NEON assembly

  • -bclib=<bclib> - Specify the bclib filename

  • -bclib_relaxed=<bclib_relaxed> - Specify the bclib filename optimized for relaxed precision floating point maths

  • -bounds-checking-single-trap - Use one trap block per function

  • -build-checksum=<checksum> - Embed a checksum of this compiler invocation for cache invalidation at a later time

  • -color - use colored syntax highlighting (default=autodetect)

  • -embedRSInfo - Embed RS Info into the object file instead of generating a separate .o.info file

  • -emit-llvm - Emit an LLVM-IR version of the generated program

  • -enable-implicit-null-checks - Fold null checks into faulting memory operations

  • -enable-load-pre -

  • -enable-name-compression - Enable name string compression

  • -enable-objc-arc-opts - enable/disable all ARC Optimizations

  • -enable-scoped-noalias -

  • -enable-tbaa -

  • -exhaustive-register-search - Exhaustive Search for registers bypassing the depth and interference cutoffs of last chance recoloring

  • -expensive-combines - Enable expensive instruction combines

  • -fPIC - Generate fully relocatable, position independent code

  • -filter-print-funcs=<function names> - Only print IR for functions whose name match this for all print-[before|after][-all] options

  • -imp-null-check-page-size=<int> - The page size of the target in bytes

  • -internalize-public-api-file=<filename> - A file containing list of symbol names to preserve

  • -internalize-public-api-list=<list> - A list of symbol names to preserve

  • -invoke=<string> - Invocable functions

  • -join-liveintervals - Coalesce copies (default=true)

  • -limit-float-precision=<uint> - Generate low-precision inline sequences for some float libcalls

  • -load=<pluginfilename> - Load the specified plugin

  • -merge=<string> - Lists of kernels to merge (as source-and-slot pairs) and names for the final merged kernels

  • -mtriple=<triple> - Specify the target triple (default: armv7-none-linux-gnueabi)

  • -no-discriminators - Disable generation of discriminator information.

  • -o=<filename> - Specify the output filename

  • -output_path=<output path> - Specify the output path

  • -plugin=<pluginfilename> - Load the specified vendor plugin. Use this instead of the -load option

  • -print-after-all - Print IR after each pass

  • -print-before-all - Print IR before each pass

  • -print-machineinstrs=<pass-name>- Print machine instrs

  • -regalloc - Register allocator to use =default - pick register allocator based on -O option =pbqp - PBQP register allocator =greedy - greedy register allocator =fast - fast register allocator =basic - basic register allocator

  • -rewrite-map-file=<filename> - Symbol Rewrite Map

  • -rng-seed=<seed> - Seed for the random number generator

  • -rs-debug-ctx - Enable build to work with a RenderScript debug context

  • -rs-global-info - Embed information about global variables in the code

  • -rs-global-info-skip-constant - Skip embedding information about constant global variables in the code

  • -sample-profile-check-record-coverage=<N> - Emit a warning if less than N% of records in the input profile are matched to the IR.

  • -sample-profile-check-sample-coverage=<N> - Emit a warning if less than N% of samples in the input profile are matched to the IR.

  • -sample-profile-inline-hot-threshold=<N> - Inlined functions that account for more than N% of all samples collected in the parent function, will be inlined again.

  • -sample-profile-max-propagate-iterations=<uint> - Maximum number of iterations to go through when propagating sample block/edge weights through the CFG.

  • -stackmap-version=<int> - Specify the stackmap encoding version (default = 1)

  • -static-func-full-module-prefix - Use full module build paths in the profile counter names for static functions.

  • -stats - Enable statistics output from program (available with Asserts)

  • -stats-json - Display statistics as json data

  • -summary-file=<string> - The summary file to use for function importing.

  • -threads=<int> -

  • -time-passes - Time each pass, printing elapsed time for each on exit

  • -verify-debug-info -

  • -verify-dom-info - Verify dominator info (time consuming)

  • -verify-loop-info - Verify loop info (time consuming)

  • -verify-machine-dom-info - Verify machine dominator info (time consuming)

  • -verify-regalloc - Verify during register allocation

  • -verify-region-info - Verify region info (time consuming)

  • -verify-scev - Verify ScalarEvolution's backedge taken counts (slow)

  • -verify-scev-maps - Verify no dangling value in ScalarEvolution's ExprValueMap (slow)

  • -vp-counters-per-site=<number> - The average number of profile counters allocated per value profiling site.

  • -vp-static-alloc - Do static counter allocation for value profiler Generic Options:

  • -help - Display available options (-help-hidden for more)

  • -help-list - Display list of available options (-help-list-hidden for more)

  • -version - Display the version of this program
  •    

    Комментарии
    Инструменты для анализа ввода-вывода в Linux, работы в сети, мониторинга на основе BPF

    Коллекция компиляторов BPF (BCC)

    BCC — это набор инструментов для создания эффективных программ трассировки ядра
    и управления им, который включает в себя несколько полезных инструментов и примеров.
    Он использует расширенный BPF (Berkeley Packet Filters), официально известный как eBPF,
    новую функцию, впервые добавленную в Linux 3.15.
    Многое из того, что использует BCC, требует Linux 4.1 и выше.

    eBPF описывается как:

    Одной из наиболее интересных функций в этом цикле является возможность присоединения
    программ eBPF (определяемый пользователем изолированный байт-код, выполняемый ядром) к kprobes.
    Это позволяет настраивать пользовательский инструментарий на живом образе ядра,
    что никогда не приведет к сбою, зависанию или отрицательному влиянию на ядро.
    BCC упрощает написание программ BPF благодаря инструментарию ядра на C
    (и включает C-оболочку для LLVM) и внешним интерфейсам на Python и lua.
    Он подходит для многих задач, включая анализ производительности и контроль сетевого трафика.

    В этом примере отслеживается функция ядра дискового ввода-вывода и заполняется
    встроенная в ядро гистограмма степени двойки размера ввода-вывода.
    Для эффективности на уровень пользователя возвращается только сводка гистограммы.

    # ./bitehist.py
    Трассировка... Нажмите Ctrl-C, чтобы закончить.
    ^ С
    kbytes : подсчет распределения
    0 -> 1 : 3 | |
    2 -> 3 : 0 | |
    4 -> 7 : 211 | ********** |
    8 -> 15 : 0 | |
    16 -> 31 : 0 | |
    32 -> 63 : 0 | |
    64 -> 127 : 1 | |
    128 -> 255 : 800 |********************************************|
    Вышеприведенный результат показывает бимодальное распределение,
    где самый большой режим 800 операций ввода-вывода имел размер от 128 до 255 Кбайт.

    См. справочное руководство по API bcc и bcc/BPF.
    https://github.com/iovisor/bcc/blob/master/docs/reference_guide.md

    --------------------------
    console:/ $ bcc -version
    libbcc (The Android Open Source Project, http://www.android.com/):
    Default target: armv7-none-linux-gnueabi

    LLVM (http://llvm.org/):
    Version: 3.8.275480
    console:/ $ bcc -help-list
    USAGE: bcc [subcommand] [options] <input bitcode files>

    OPTIONS:
    -C - Alias for -mtriple
    -O=<char> - Optimization level. [-O0, -O1, -O2, or -O3] (default: -O3)
    -aarch64-neon-syntax - Choose style of NEON code to emit from AArch64 backend:
    =generic - Emit generic NEON assembly
    =apple - Emit Apple-style NEON assembly
    -bclib=<bclib> - Specify the bclib filename
    -bclib_relaxed=<bclib_relaxed> - Specify the bclib filename optimized for relaxed precision floating point maths
    -bounds-checking-single-trap - Use one trap block per function
    -build-checksum=<checksum> - Embed a checksum of this compiler invocation for cache invalidation at a later time
    -color - use colored syntax highlighting (default=autodetect)
    -embedRSInfo - Embed RS Info into the object file instead of generating a separate .o.info file
    -emit-llvm - Emit an LLVM-IR version of the generated program
    -enable-implicit-null-checks - Fold null checks into faulting memory operations
    -enable-load-pre -
    -enable-name-compression - Enable name string compression
    -enable-objc-arc-opts - enable/disable all ARC Optimizations
    -enable-scoped-noalias -
    -enable-tbaa -
    -exhaustive-register-search - Exhaustive Search for registers bypassing the depth and interference cutoffs of last chance recoloring
    -expensive-combines - Enable expensive instruction combines
    -fPIC - Generate fully relocatable, position independent code
    -filter-print-funcs=<function names> - Only print IR for functions whose name match this for all print-[before|after][-all] options
    -help - Display available options (-help-hidden for more)
    -imp-null-check-page-size=<int> - The page size of the target in bytes
    -internalize-public-api-file=<filename> - A file containing list of symbol names to preserve
    -internalize-public-api-list=<list> - A list of symbol names to preserve
    -invoke=<string> - Invocable functions
    -join-liveintervals - Coalesce copies (default=true)
    -limit-float-precision=<uint> - Generate low-precision inline sequences for some float libcalls
    -load=<pluginfilename> - Load the specified plugin
    -merge=<string> - Lists of kernels to merge (as source-and-slot pairs) and names for the final merged kernels
    -mtriple=<triple> - Specify the target triple (default: armv7-none-linux-gnueabi)
    -no-discriminators - Disable generation of discriminator information.
    -o=<filename> - Specify the output filename
    -output_path=<output path> - Specify the output path
    -plugin=<pluginfilename> - Load the specified vendor plugin. Use this instead of the -load option
    -print-after-all - Print IR after each pass
    -print-before-all - Print IR before each pass
    -print-machineinstrs=<pass-name> - Print machine instrs
    -regalloc - Register allocator to use
    =default - pick register allocator based on -O option
    =pbqp - PBQP register allocator
    =greedy - greedy register allocator
    =fast - fast register allocator
    =basic - basic register allocator
    -rewrite-map-file=<filename> - Symbol Rewrite Map
    -rng-seed=<seed> - Seed for the random number generator
    -rs-debug-ctx - Enable build to work with a RenderScript debug context
    -rs-global-info - Embed information about global variables in the code
    -rs-global-info-skip-constant - Skip embedding information about constant global variables in the code
    -sample-profile-check-record-coverage=<N> - Emit a warning if less than N% of records in the input profile are matched to the IR.
    -sample-profile-check-sample-coverage=<N> - Emit a warning if less than N% of samples in the input profile are matched to the IR.
    -sample-profile-inline-hot-threshold=<N> - Inlined functions that account for more than N% of all samples collected in the parent function, will be inlined again.
    -sample-profile-max-propagate-iterations=<uint> - Maximum number of iterations to go through when propagating sample block/edge weights through the CFG.
    -stackmap-version=<int> - Specify the stackmap encoding version (default = 1)
    -static-func-full-module-prefix - Use full module build paths in the profile counter names for static functions.
    -stats - Enable statistics output from program (available with Asserts)
    -stats-json - Display statistics as json data
    -summary-file=<string> - The summary file to use for function importing.
    -threads=<int> -
    -time-passes - Time each pass, printing elapsed time for each on exit
    -verify-debug-info -
    -verify-dom-info - Verify dominator info (time consuming)
    -verify-loop-info - Verify loop info (time consuming)
    -verify-machine-dom-info - Verify machine dominator info (time consuming)
    -verify-regalloc - Verify during register allocation
    -verify-region-info - Verify region info (time consuming)
    -verify-scev - Verify ScalarEvolution's backedge taken counts (slow)
    -verify-scev-maps - Verify no dangling value in ScalarEvolution's ExprValueMap (slow)
    -version - Display the version of this program
    -vp-counters-per-site=<number> - The average number of profile counters allocated per value profiling site.
    -vp-static-alloc - Do static counter allocation for value profiler
    console:/ $