1
/*******************************************************************************
2
* Copyright (c) 2004, 2008, 2009 Red Hat, Inc.
3
* All rights reserved. This program and the accompanying materials
4
* are made available under the terms of the Eclipse Public License v1.0
5
* which accompanies this distribution, and is available at
6
* http://www.eclipse.org/legal/epl-v10.html
9
* Keith Seitz <keiths@redhat.com> - initial API and implementation
10
* Kent Sebastian <ksebasti@redhat.com>
11
*******************************************************************************/
12
package org.eclipse.linuxtools.internal.oprofile.core.daemon;
16
* This class represents the global launch options for the
19
public class OprofileDaemonOptions {
21
private String kernelImageFile;
23
// Enable verbose logging?
24
private boolean verboseLogging;
26
// How to separate profiles (mask)
27
private int separateProfiles;
29
// the image to profile
30
private String binaryImage;
32
//how many calls down to profile
33
private int callgraphDepth;
36
* Sample separation options. Determines how oprofiled will group
37
* samples for binaries which isn't the main binary being profiled.
39
* Currently only properly support:
40
* -none: ignore all other binaries
41
* -library: include shared library samples
42
* -kernel: include kernel module samples (which implicitly includes library)
44
* the others probably wouldn't show nicely in the view
46
public static final int SEPARATE_NONE = 0;
47
public static final int SEPARATE_LIBRARY = 1;
48
public static final int SEPARATE_KERNEL = 2;
49
public static final int SEPARATE_THREAD = 4;
50
public static final int SEPARATE_CPU = 8;
52
public OprofileDaemonOptions() {
54
kernelImageFile = ""; //$NON-NLS-1$
55
verboseLogging = false;
56
separateProfiles = SEPARATE_NONE;
57
binaryImage = ""; //$NON-NLS-1$
62
* Get the kernel image file
63
* @return the kernel image file
65
public String getKernelImageFile() {
66
return kernelImageFile;
70
* Set the kernel image file
71
* @param image the kernel image
73
public void setKernelImageFile(String image) {
74
kernelImageFile = image;
78
* Get daemon verbose logging
79
* @return whether verbose logging is enabled
81
public boolean getVerboseLogging() {
82
return verboseLogging;
86
* Set daemon verbose logging
87
* @param logging whether to enable verbose logging
89
public void setVerboseLogging(boolean logging) {
90
verboseLogging = logging;
94
* Get daemon profile separation mask
95
* @return mask of options
97
public int getSeparateProfilesMask() {
98
return separateProfiles;
102
* Set daemon profile separation mask
103
* @param mask the new separation mask
105
public void setSeparateProfilesMask(int mask) {
106
separateProfiles = mask;
110
* Get the path to the binary image being profiled.
111
* @return full path to the binary
113
public String getBinaryImage() {
118
* Sets the path of the binary image to profile.
119
* @param image full path to the binary
121
public void setBinaryImage(String image) {
122
this.binaryImage = image;
126
* Get the call depth value.
127
* @return integer amount of calls down to profile
129
public int getCallgraphDepth() {
130
return callgraphDepth;
134
* Sets the call depth value.
135
* @param depth integer amount of calls down to profile
137
public void setCallgraphDepth(int depth) {
138
this.callgraphDepth = depth;