|
1 /* |
|
2 * Copyright (c) 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 the License "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 */ |
|
17 |
|
18 package com.nokia.carbide.cpp.pi.graphicsmemory; |
|
19 |
|
20 import com.nokia.carbide.cpp.internal.pi.model.GenericSample; |
|
21 |
|
22 public class GraphicsMemorySample extends GenericSample { |
|
23 private static final long serialVersionUID = -854731258436977706L; |
|
24 public GraphicsMemoryProcess process; |
|
25 public int privateSize; |
|
26 public int sharedSize; |
|
27 public int sampleNum; // not used |
|
28 public int type; // not used |
|
29 |
|
30 /** |
|
31 * Process with time stamp |
|
32 * |
|
33 * @param process |
|
34 * @param sampleSynchTime |
|
35 */ |
|
36 public GraphicsMemorySample(GraphicsMemoryProcess process, |
|
37 int sampleSynchTime) { |
|
38 this.process = process; |
|
39 this.sampleSynchTime = sampleSynchTime; |
|
40 } |
|
41 |
|
42 /** |
|
43 * System memory usage with time stamp |
|
44 * |
|
45 * @param usedMemory |
|
46 * @param totalMemory |
|
47 * @param sampleNum |
|
48 */ |
|
49 public GraphicsMemorySample(int usedMemory, int totalMemory, |
|
50 int sampleSynchTime) { |
|
51 this.privateSize = usedMemory; |
|
52 this.sharedSize = totalMemory; |
|
53 this.sampleSynchTime = sampleSynchTime; |
|
54 this.process = new GraphicsMemoryProcess( |
|
55 GraphicsMemoryTraceParser.SAMPLE_TOTAL_MEMORY_PROCESS_ID, |
|
56 GraphicsMemoryTraceParser.SAMPLE_TOTAL_MEMORY_PROCESS_NAME); |
|
57 } |
|
58 } |