1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/openeuler-stratovirt

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Это зеркальный репозиторий, синхронизируется ежедневно с исходного репозитория.
В этом репозитории не указан файл с открытой лицензией (LICENSE). При использовании обратитесь к конкретному описанию проекта и его зависимостям в коде.
Клонировать/Скачать
trace.md 1.1 КБ
Копировать Редактировать Исходные данные Просмотреть построчно История
yezengruan Отправлено 2 лет назад 3f9f1ec

Tracing

This document describes the way for debugging and profiling in StratoVirt and how to use it.

Ftrace

Ftrace is a tracer provided by Linux kernel, which can help linux developers to debug or analyze issues. As ftrace can avoid performance penalty, it's especially suited for performance issues.

StratoVirt use ftrace by writing trace data to ftrace marker, and developers can read trace records from trace file under mounted ftrace director, e.g. /sys/kernel/debug/tracing/trace.

How to use

Trace events are put in StratoVirt by the macro ftrace!. The first parameter the macro receives is name of the trace event. Remaining parameters the macro receives are the same as println! or format!, i.e. the first parameter is a format string, and additional parameters passed replace the {}s within the format string.

#[macro_use]
extern crate util;

fn trace_example() {
    ftrace!(trace_example, "Test for tracer.");
}

Trace events in StratoVirt are disabled by default. Users can pass the file listing enabled events by launching StratoVirt with "-trace events=". The file should contains one event name per line.

Комментарий ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://gitlife.ru/oschina-mirror/openeuler-stratovirt.git
git@gitlife.ru:oschina-mirror/openeuler-stratovirt.git
oschina-mirror
openeuler-stratovirt
openeuler-stratovirt
v2.3.0