1# JS API Changes of the DFX Subsystem 2 3The table below lists the APIs changes of the DFX subsystem in OpenHarmony 3.1 Release over OpenHarmony 3.0 LTS. 4 5## API Changes 6 7| Module| Class| Method/Attribute/Enumeration/Constant| Change Type| 8|---|---|---|---| 9| ohos.hiTraceMeter | hiTraceMeter | traceByValue(name: string, count: number): void; | Added| 10| ohos.hiTraceMeter | hiTraceMeter | finishTrace(name: string, taskId: number): void; | Added| 11| ohos.hiTraceMeter | hiTraceMeter | startTrace(name: string, taskId: number): void; | Added| 12| ohos.hiTraceChain | hiTraceChain | enableFlag(id: HiTraceId, flag: HiTraceFlag): void; | Added| 13| ohos.hiTraceChain | hiTraceChain | isFlagEnabled(id: HiTraceId, flag: HiTraceFlag): boolean; | Added| 14| ohos.hiTraceChain | hiTraceChain | isValid(id: HiTraceId): boolean; | Added| 15| ohos.hiTraceChain | hiTraceChain | tracepoint(mode: HiTraceCommunicationMode, type: HiTraceTracepointType, id: HiTraceId, msg?: string): void; | Added| 16| ohos.hiTraceChain | hiTraceChain | createSpan(): HiTraceId; | Added| 17| ohos.hiTraceChain | hiTraceChain | clearId(): void; | Added| 18| ohos.hiTraceChain | hiTraceChain | setId(id: HiTraceId): void; | Added| 19| ohos.hiTraceChain | hiTraceChain | getId(): HiTraceId; | Added| 20| ohos.hiTraceChain | hiTraceChain | end(id: HiTraceId): void; | Added| 21| ohos.hiTraceChain | hiTraceChain | begin(name: string, flags: number = HiTraceFlag.DEFAULT): HiTraceId; | Added| 22| ohos.hiTraceChain | HiTraceId | flags?: number; | Added| 23| ohos.hiTraceChain | HiTraceId | parentSpanId?: number; | Added| 24| ohos.hiTraceChain | HiTraceId | spanId?: number; | Added| 25| ohos.hiTraceChain | HiTraceId | chainId: bigint; | Added| 26| ohos.hiTraceChain | HiTraceCommunicationMode | DEVICE = 3 | Added| 27| ohos.hiTraceChain | HiTraceCommunicationMode | PROCESS = 2 | Added| 28| ohos.hiTraceChain | HiTraceCommunicationMode | THREAD = 1 | Added| 29| ohos.hiTraceChain | HiTraceCommunicationMode | DEFAULT = 0 | Added| 30| ohos.hiTraceChain | HiTraceTracepointType | GENERAL = 4 | Added| 31| ohos.hiTraceChain | HiTraceTracepointType | SR = 3 | Added| 32| ohos.hiTraceChain | HiTraceTracepointType | SS = 2 | Added| 33| ohos.hiTraceChain | HiTraceTracepointType | CR = 1 | Added| 34| ohos.hiTraceChain | HiTraceTracepointType | CS = 0 | Added| 35| ohos.hiTraceChain | HiTraceFlag | D2D_TP_INFO = 1 << 6 | Added| 36| ohos.hiTraceChain | HiTraceFlag | FAILURE_TRIGGER = 1 << 5 | Added| 37| ohos.hiTraceChain | HiTraceFlag | DISABLE_LOG = 1 << 4 | Added| 38| ohos.hiTraceChain | HiTraceFlag | NO_BE_INFO = 1 << 3 | Added| 39| ohos.hiTraceChain | HiTraceFlag | TP_INFO = 1 << 2 | Added| 40| ohos.hiTraceChain | HiTraceFlag | DONOT_CREATE_SPAN = 1 << 1 | Added| 41| ohos.hiTraceChain | HiTraceFlag | INCLUDE_ASYNC = 1 | Added| 42| ohos.hiTraceChain | HiTraceFlag | DEFAULT = 0 | Added| 43| ohos.hilog | LogLevel | FATAL = 7 | Added| 44| ohos.hilog | LogLevel | ERROR = 6 | Added| 45| ohos.hilog | LogLevel | WARN = 5 | Added| 46| ohos.hilog | LogLevel | INFO = 4 | Added| 47| ohos.hilog | LogLevel | DEBUG = 3 | Added| 48| ohos.hilog | hilog | isLoggable(domain: number, tag: string, level: LogLevel) : boolean; | Added| 49| ohos.hilog | hilog | fatal(domain: number, tag: string, format: string, ...args: any[]) : void; | Added| 50| ohos.hilog | hilog | error(domain: number, tag: string, format: string, ...args: any[]) : void; | Added| 51| ohos.hilog | hilog | warn(domain: number, tag: string, format: string, ...args: any[]) : void; | Added| 52| ohos.hilog | hilog | info(domain: number, tag: string, format: string, ...args: any[]) : void; | Added| 53| ohos.hilog | hilog | debug(domain: number, tag: string, format: string, ...args: any[]) : void; | Added| 54| ohos.hidebug | hidebug | dumpHeapData(filename : string) : void; | Added| 55| ohos.hidebug | hidebug | stopProfiling() : void; | Added| 56| ohos.hidebug | hidebug | startProfiling(filename : string) : void; | Added| 57| ohos.hidebug | hidebug | getSharedDirty() : bigint; | Added| 58| ohos.hidebug | hidebug | getPss() : bigint; | Added| 59| ohos.hidebug | hidebug | getNativeHeapFreeSize() : bigint; | Added| 60| ohos.hidebug | hidebug | getNativeHeapAllocatedSize() : bigint; | Added| 61| ohos.hidebug | hidebug | getNativeHeapSize() : bigint; | Added| 62| ohos.hichecker | hichecker | contains(rule: bigint) : boolean; | Added| 63| ohos.hichecker | hichecker | getRule() : bigint; | Added| 64| ohos.hichecker | hichecker | removeRule(rule: bigint) : void; | Added| 65| ohos.hichecker | hichecker | addRule(rule: bigint) : void; | Added| 66| ohos.hichecker | hichecker | const RULE_CHECK_ABILITY_CONNECTION_LEAK: 8589934592n; | Added| 67| ohos.hichecker | hichecker | const RULE_THREAD_CHECK_SLOW_PROCESS: 1n; | Added| 68| ohos.hichecker | hichecker | const RULE_CAUTION_TRIGGER_CRASH: 4611686018427387904n; | Added| 69| ohos.hichecker | hichecker | const RULE_CAUTION_PRINT_LOG: 9223372036854775808n; | Added| 70| ohos.faultLogger | FaultLogInfo | fullLog: string; | Added| 71| ohos.faultLogger | FaultLogInfo | summary: string; | Added| 72| ohos.faultLogger | FaultLogInfo | module: string; | Added| 73| ohos.faultLogger | FaultLogInfo | reason: string; | Added| 74| ohos.faultLogger | FaultLogInfo | timestamp: number; | Added| 75| ohos.faultLogger | FaultLogInfo | type: FaultType; | Added| 76| ohos.faultLogger | FaultLogInfo | uid: number; | Added| 77| ohos.faultLogger | FaultLogInfo | pid: number; | Added| 78| ohos.faultLogger | FaultLogger | querySelfFaultLog(faultType: FaultType, callback: AsyncCallback\<Array\<FaultLogInfo>>) : void;<br>querySelfFaultLog(faultType: FaultType) : Promise\<Array\<FaultLogInfo>>; | Added| 79| ohos.faultLogger | FaultType | APP_FREEZE = 4 | Added| 80| ohos.faultLogger | FaultType | JS_CRASH = 3 | Added| 81| ohos.faultLogger | FaultType | CPP_CRASH = 2 | Added| 82| ohos.faultLogger | FaultType | NO_SPECIFIC = 0 | Added| 83