|
1 /* |
|
2 * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 * TraceViewer Constants |
|
17 * |
|
18 */ |
|
19 package com.nokia.traceviewer.engine; |
|
20 |
|
21 /** |
|
22 * BTrace Constants |
|
23 */ |
|
24 public interface BTraceConstants { |
|
25 |
|
26 /** |
|
27 * Header 2 present bit |
|
28 */ |
|
29 static final int HEADER2_PRESENT_BIT = 0; |
|
30 |
|
31 /** |
|
32 * Timestamp present bit |
|
33 */ |
|
34 static final int TIMESTAMP_PRESENT_BIT = 1; |
|
35 |
|
36 /** |
|
37 * Timestamp2 present bit |
|
38 */ |
|
39 static final int TIMESTAMP2_PRESENT_BIT = 2; |
|
40 |
|
41 /** |
|
42 * Context ID present bit |
|
43 */ |
|
44 static final int CONTEXT_ID_PRESENT_BIT = 3; |
|
45 |
|
46 /** |
|
47 * Program counter present bit |
|
48 */ |
|
49 static final int PROGRAM_COUNTER_PRESENT_BIT = 4; |
|
50 |
|
51 /** |
|
52 * Extra value present bit |
|
53 */ |
|
54 static final int EXTRA_VALUE_PRESENT_BIT = 5; |
|
55 |
|
56 /** |
|
57 * Record truncated bit |
|
58 */ |
|
59 static final int RECORD_TRUNCATED_BIT = 6; |
|
60 |
|
61 /** |
|
62 * Record missing bit |
|
63 */ |
|
64 static final int RECORD_MISSING_BIT = 7; |
|
65 |
|
66 /** |
|
67 * Length of a single variable |
|
68 */ |
|
69 static final int BTRACE_VARIABLE_LENGTH = 4; |
|
70 |
|
71 /** |
|
72 * Length of BTrace header |
|
73 */ |
|
74 static final int BTRACE_HEADER_LENGTH = 4; |
|
75 |
|
76 /** |
|
77 * Number of flags |
|
78 */ |
|
79 static final int FLAGS_LENGTH = 8; |
|
80 |
|
81 /** |
|
82 * Mask to get CPU ID from BTrace Header 2 |
|
83 */ |
|
84 static final int CPU_ID_MASK = 0xfff << 20; |
|
85 |
|
86 /** |
|
87 * Shift to get CPU ID from BTrace Header 2 |
|
88 */ |
|
89 static final int CPU_ID_SHIFT = 20; |
|
90 |
|
91 /** |
|
92 * Mask to get MultiPart ID from BTrace Header 2 |
|
93 */ |
|
94 static final int MULTIPART_MASK = 3 << 0; |
|
95 |
|
96 } |