Skip to content

Commit d9044ec

Browse files
niruiyuniruiyu
authored and
niruiyu
committed
Use RLE (Run Length Encoding) to improve debugging performance.
DEBUG_AGENT_REVISION is DEBUG_AGENT_REVISION_03 to disable this feature and will be changed to DEBUG_AGENT_REVISION_04 when new version of HOST is released. Reduce the stack usage by re-using the same buffer to send/receive packet. Zero out the buffer before fxsave so that the reserved field in the buffer remains 0 for better RLE compression ratio. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <[email protected]> Reviewed-by: Jeff Fan <[email protected]> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16628 6f19259b-4bc3-4df7-8a09-765794883524
1 parent 6a39a6a commit d9044ec

File tree

5 files changed

+277
-106
lines changed

5 files changed

+277
-106
lines changed

SourceLevelDebugPkg/Include/TransferProtocol.h

+12-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Transfer protocol defintions used by debug agent and host. It is only
33
intended to be used by Debug related module implementation.
44
5-
Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
5+
Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR>
66
This program and the accompanying materials
77
are licensed and made available under the terms and conditions of the BSD License
88
which accompanies this distribution. The full text of the license may be found at
@@ -20,12 +20,15 @@
2020

2121
//
2222
// Current revision of transfer protocol
23+
// 0.4: Packet compression and decompression.
2324
//
24-
#define DEBUG_AGENT_REVISION ((0 << 16) | 03)
25+
#define DEBUG_AGENT_REVISION_03 ((0 << 16) | 03)
26+
#define DEBUG_AGENT_REVISION_04 ((0 << 16) | 04)
27+
#define DEBUG_AGENT_REVISION DEBUG_AGENT_REVISION_03
2528
#define DEBUG_AGENT_CAPABILITIES 0
2629

2730
//
28-
// Definitions for attach command
31+
// Definitions for the (A)ttach command
2932
//
3033
#define DEBUG_STARTING_SYMBOL_ATTACH (0xFA)
3134

@@ -34,10 +37,15 @@
3437
//
3538
#define DEBUG_STARTING_SYMBOL_NORMAL (0xFE)
3639

40+
//
41+
// Definition for starting symbol of a (C)ompressed debug packet. Choose a non-ASCII to avoid conflict with other serial output.
42+
//
43+
#define DEBUG_STARTING_SYMBOL_COMPRESS (0xFC)
44+
3745
#pragma pack(1)
3846

3947
//
40-
// Definition for debug packet header for normal debug packets (not including break/attach command)
48+
// Definition for debug packet header for debug packets (not including attach command)
4149
//
4250
typedef struct {
4351
UINT8 StartSymbol;

0 commit comments

Comments
 (0)