This document describes the way for debugging and profiling in StratoVirt and how to use it.
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.
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 )