Originally, we don't format the output of analyser well. It is hard to read the
result.
This patch make every entry of the result align with the corresponding title to
make it easier for users to read.
Without patch:
Event NR_Exit NR_Exit/Sec Time Consumed(cycles) Time Percentage
VMEXIT_INTERRUPT_WINDOW 78090 130.15 40 0.01
VMEXIT_CR_ACCESS 0 0.00 0 0.00
VMEXIT_APICV_ACCESS 0 0.00 0 0.00
VMEXIT_EXCEPTION_OR_NMI 0 0.00 0 0.00
VMEXIT_RDTSC 0 0.00 0 0.00
...
Vector Count NR_Exit/Sec
0x000000f0 82337 137.23
0x000000ef 247713 412.85
With patch:
Event NR_Exit NR_Exit/Sec Time Consumed(cycles) Time percentage
VMEXIT_APICV_WRITE 13352 22.25 14331304 0.00
VMEXIT_WRMSR 309085 515.14 241166212 0.02
VMEXIT_INTERRUPT_WINDOW 78090 130.15 76841734 0.01
...
Vector Count NR_Exit/Sec
0x000000f0 82337 137.23
0x000000ef 247713 412.85
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
Option "-r" has been removed by commit 3d6ff0e (tools: acrntrace: save trace
data file under current dir by default). But leaves something unused in optstring
and README.rst.
This patch remove thest related things.
BTW, this patch refine the usage output to print [-t max_time].
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Acked-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Reviewed-by: Like Yan <like.yan@intel.com>
Current implementation save trace data files on tmpfs by default, acrntrace
would use up all the physical mem, which can affect system functioning.
This commit changes default location for trace data file to current dir, and
removes the codes for space reservation, which is not necessary.
Signed-off-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
Reviewed-by: Li, Fei1 <fei1.li@intel.com>
Value of VMEXIT_XXX must have the same as TRACE_VMEXIT_XXX defined in
./hypervisor/include/debug/trace.h. This patch fix the events with wrong event id.
Fixes: 8a233ee (tools: acrntrace: Refactor vmexit_analyzer based on new trace format)
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
The tools currently rely on the availability of binary "mkdir" to be available
in the $PATH on the Service OS. This creates an obscure dependency. The patch
changes the code to use standard C APIs to perform the same functionality which
makes the code more self-contained.
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
The tools currently rely on the availability of binary "ls" to be available in
the $PATH on the Service OS. This create an obscure dependency. The patch changes
the code to use standard C APIs to perform the same functionality which makes
the code more self-contained.
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
Function get_cpu_freq is not used anymore. This patch remove it.
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
We have TRACE_6C and TRACE_16STR API in hypervisor now. It's time to add support
for parsing data traced by both APIs.
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
If option -t is configured, a timer will be set with configured timeout when
launching acrntrace. When timer fired, acrntrace will exit.
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Option -i is more suitable for interval. Meanwhile, we will use option -t for
timeout in later patch.
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
acrntrace writes trace data to /tmp with unlimited size and will cause tmpfs
100% occupied. Consequently, some problem will raise up on SOS, like failing to
exec cmd.
This patch introduce an option -r to let user configre minimal space left on the
disk which ensures that acrntrace will exit when free storage space is less than
the reserved space. By default, we reserve 512M on the disk. Users can configure
reserved space through '-r'.
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
-Add acrntrace_format.py usage to README.rst
-Add acrntrace usage to README.rst
-Add acrnanalyze.py to README.rst
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Acked-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
The trend is to focus on Python3 and deprecate Python2. This patch make all the
acrntrace related scripts as Python3 module.
- Add parentheses to all the print as Python3 required.
- Remove suffix L and long() Python3 has deprecated. Python3 will treat all
intergers as long.
- Replace has_key() with "key in .keys()" because has_key() has been deprecated.
- Other minor fixes.
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
This analyzer is implemented in vmexit_analyze. This patch make it as independent
analyzer with an option "--irq"
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
- Refactor vmexit_analyzer based on new trace format (raw data). We can get
the same output like original implementation.
- Remove irq related analysis. Will add it back with an option "--irq".
- Remove unused VMEXIT_EPT_VIOLATION_GVT
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
As we may analyze multi-cases at the same time. It's better to store all the
analyzer in an array. Then we can traverse the array and exec all analyzer one
by one.
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Originally, acrntrace stores cpu frequency in output file and use it for time-based
analysis. Actually, we should use TSC frequency instead of cpu frequency.
This patch change to using TSC frequency for time-based analysis and introduce
an option "-f --frequency" to let user configure TSC frequency.
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
acrntrace_format.py is used for parsing raw trace data to human-readable file on
given format. A sample format file for acrntrace predefined trace events is available
in tools/acrntrace/scripts/formats in acrn source tree.
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Benefits of outputing trace data as raw data:
- Smaller trace data size
- More convenient to add new trace entry. There is no need to change acrntrace
when we add new trace entry to HV. All we need do is to update the analysis
scripts to deal with this situation.
Trace data size(with 1 UOS):
~57M -- with patch
~137M -- without patch
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Add a Makefile under ./tools to avoid changing top-level Makefile frequently
Acked-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Signed-off-by: Yan, Like <like.yan@intel.com>
This continues the editing from PR #276 with formatting and clarity
edits to have these tool documents blend in with the rest of the ACRN
documentation. It also builds on PR #307 that set up the doc build
infrastructure to allow leaving these tool docs within the tools/
folder.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The make install target was missing. This commits adds the intall target
which uses the install target from subprojects.
Also a make install target was created in each tool program.
Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
Fix NULL pointer dereference if 'localtime()' execution encountered an error,
in create_trace_file_dir().
Signed-off-by: Yan, Like <like.yan@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
it can be used as following:
make ==> to make hypervisor & devicemodel & tools
also modify tools makefile to support out-dir setting.
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Reviewed-by: Jack Ren <jack.ren@intel.com>
The tools directory is moved out of ./devicemodle, to be in parallel with
hypervisor, devicemodel and doc.
Signed-off-by: Yan, Like <like.yan@intel.com>