1e41f4b71Sopenharmony_ci# DFX Overview
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ci
4e41f4b71Sopenharmony_ci## Introduction
5e41f4b71Sopenharmony_ci
6e41f4b71Sopenharmony_ci[Design for X](https://en.wikipedia.org/wiki/Design_for_X)  \(DFX\) refers to the software design that aims to improve the quality attributes in OpenHarmony. It mainly consists of two parts: design for reliability \(DFR\) and design for testability \(DFT\). 
7e41f4b71Sopenharmony_ci
8e41f4b71Sopenharmony_ciThe DFX subsystem provides the following functions:
9e41f4b71Sopenharmony_ci
10e41f4b71Sopenharmony_ci- HiLog: implements the logging function. It is applicable to mini-system devices \(reference memory ≥ 128 KiB\), small-system devices \(reference memory ≥ 1 MiB\), and standard-system devices \(reference memory ≥ 128 MiB\).
11e41f4b71Sopenharmony_ci
12e41f4b71Sopenharmony_ci- HiTraceChain: implements distributed call chain trace. It is applicable to standard-system devices \(reference memory ≥ 128 MiB\).
13e41f4b71Sopenharmony_ci
14e41f4b71Sopenharmony_ci- HiTraceMeter: implements performance trace. It is applicable to standard-system devices \(reference memory ≥ 128 MiB\).
15e41f4b71Sopenharmony_ci
16e41f4b71Sopenharmony_ci- HiCollie: implements thread suspension detection. It is applicable to standard-system devices \(reference memory ≥ 128 MiB\).
17e41f4b71Sopenharmony_ci
18e41f4b71Sopenharmony_ci- HiSysEvent: implements system event logging. It is applicable to standard-system devices \(reference memory ≥ 128 MiB\).
19e41f4b71Sopenharmony_ci
20e41f4b71Sopenharmony_ci- HiDumper: exports system information. It is applicable to standard-system devices \(reference memory ≥ 128 MiB\).
21e41f4b71Sopenharmony_ci
22e41f4b71Sopenharmony_ci- Faultlogger: implements crash detection. It is applicable to standard-system devices \(reference memory ≥ 128 MiB\).
23e41f4b71Sopenharmony_ci
24e41f4b71Sopenharmony_ci- Hiview: implements device maintenance across different platforms. It is applicable to standard-system devices \(reference memory ≥ 128 MiB\).
25e41f4b71Sopenharmony_ci
26e41f4b71Sopenharmony_ci- HiAppEvent and HiChecker are applicable only for HAP developers.
27e41f4b71Sopenharmony_ci
28e41f4b71Sopenharmony_ci![dfx features overview](figure/dfx-overview.png)
29e41f4b71Sopenharmony_ci
30e41f4b71Sopenharmony_ci## Basic Concepts
31e41f4b71Sopenharmony_ci
32e41f4b71Sopenharmony_ci**Logging**
33e41f4b71Sopenharmony_ci
34e41f4b71Sopenharmony_ciLogging means to record the log information generated during system running so you can understand the running process and status of the system or applications.
35e41f4b71Sopenharmony_ci
36e41f4b71Sopenharmony_ci**Distributed call chain trace**
37e41f4b71Sopenharmony_ci
38e41f4b71Sopenharmony_ciIn a distributed system, the initiation of a service may involve multiple software modules, with control commands and data transmitted over intra-process, inter-process, and inter-device communication interfaces. To help you understand such complex communication processes and locate service faults efficiently, the DFX subsystem provides a distributed call chain trace framework.
39e41f4b71Sopenharmony_ci
40e41f4b71Sopenharmony_ci**Thread suspension detection**
41e41f4b71Sopenharmony_ci
42e41f4b71Sopenharmony_ciIf a thread is trapped in an infinite loop or the kernel state (for example, Uninterruptable Sleep, Traced, Zombie, or synchronous wait) when it is running, the thread cannot respond to normal service requests and cannot detect and recover from faults by itself. To detect and locate this type of faults, the DFX subsystem provides a simple watchdog mechanism by inserting detection probes to the process nodes that are prone to suspension. This ensures that suspension faults can be detected and logs can be collected.
43e41f4b71Sopenharmony_ci
44e41f4b71Sopenharmony_ci**Logging**
45e41f4b71Sopenharmony_ci
46e41f4b71Sopenharmony_ciEvent logging means to collect and log events reported during system running. The log information will help you better analyze the product usage.
47e41f4b71Sopenharmony_ci
48e41f4b71Sopenharmony_ci**System event**
49e41f4b71Sopenharmony_ci
50e41f4b71Sopenharmony_ciA system event is an indication of the system status at a given time point during system running. You can use these events to analyze the status change of the system.
51e41f4b71Sopenharmony_ci<!--no_check-->
52