aboutsummaryrefslogtreecommitdiffstats
path: root/ddms/app
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2011-06-27 17:29:32 -0700
committerJeff Brown <jeffbrown@android.com>2011-06-27 17:31:15 -0700
commit5262fb231fa0afe2fa68e20dcf4d6c12b84a52fc (patch)
tree8bdc926a5bfa3fcf039e4c36118aa6ab5525b122 /ddms/app
parentc233709ec350fd0b2364c84a98194fa3351b2017 (diff)
downloadsdk-5262fb231fa0afe2fa68e20dcf4d6c12b84a52fc.zip
sdk-5262fb231fa0afe2fa68e20dcf4d6c12b84a52fc.tar.gz
sdk-5262fb231fa0afe2fa68e20dcf4d6c12b84a52fc.tar.bz2
Add a preference for the profiler buffer size.
8MB is getting to be too small for some purposes. Change-Id: Ic711c426febf2e42634bd73a5be6211cfe66f4c0
Diffstat (limited to 'ddms/app')
-rw-r--r--ddms/app/src/com/android/ddms/PrefsDialog.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/ddms/app/src/com/android/ddms/PrefsDialog.java b/ddms/app/src/com/android/ddms/PrefsDialog.java
index c957a89..da31a3b 100644
--- a/ddms/app/src/com/android/ddms/PrefsDialog.java
+++ b/ddms/app/src/com/android/ddms/PrefsDialog.java
@@ -86,6 +86,7 @@ public final class PrefsDialog {
private final static String PREFS_THREAD_REFRESH_INTERVAL = "threadStatusInterval"; //$NON-NLS-1$
private final static String PREFS_LOG_LEVEL = "ddmsLogLevel"; //$NON-NLS-1$
private final static String PREFS_TIMEOUT = "timeOut"; //$NON-NLS-1$
+ private final static String PREFS_PROFILER_BUFFER_SIZE_MB = "profilerBufferSizeMb"; //$NON-NLS-1$
private final static String PREFS_USE_ADBHOST = "useAdbHost"; //$NON-NLS-1$
private final static String PREFS_ADBHOST_VALUE = "adbHostValue"; //$NON-NLS-1$
@@ -154,6 +155,7 @@ public final class PrefsDialog {
DdmPreferences.setInitialThreadUpdate(mPrefStore.getBoolean(PREFS_DEFAULT_THREAD_UPDATE));
DdmPreferences.setInitialHeapUpdate(mPrefStore.getBoolean(PREFS_DEFAULT_HEAP_UPDATE));
DdmPreferences.setTimeOut(mPrefStore.getInt(PREFS_TIMEOUT));
+ DdmPreferences.setProfilerBufferSizeMb(mPrefStore.getInt(PREFS_PROFILER_BUFFER_SIZE_MB));
DdmPreferences.setUseAdbHost(mPrefStore.getBoolean(PREFS_USE_ADBHOST));
DdmPreferences.setAdbHostValue(mPrefStore.getString(PREFS_ADBHOST_VALUE));
@@ -204,6 +206,8 @@ public final class PrefsDialog {
mPrefStore.setDefault(PREFS_LOG_LEVEL, "info"); //$NON-NLS-1$
mPrefStore.setDefault(PREFS_TIMEOUT, DdmPreferences.DEFAULT_TIMEOUT);
+ mPrefStore.setDefault(PREFS_PROFILER_BUFFER_SIZE_MB,
+ DdmPreferences.DEFAULT_PROFILER_BUFFER_SIZE_MB);
// choose a default font for the text output
FontData fdat = new FontData("Courier", 10, SWT.NORMAL); //$NON-NLS-1$
@@ -247,6 +251,9 @@ public final class PrefsDialog {
(String) event.getNewValue());
} else if (changed.equals(PREFS_TIMEOUT)) {
DdmPreferences.setTimeOut(mPrefStore.getInt(PREFS_TIMEOUT));
+ } else if (changed.equals(PREFS_PROFILER_BUFFER_SIZE_MB)) {
+ DdmPreferences.setProfilerBufferSizeMb(
+ mPrefStore.getInt(PREFS_PROFILER_BUFFER_SIZE_MB));
} else if (changed.equals(PREFS_USE_ADBHOST)) {
DdmPreferences.setUseAdbHost(mPrefStore.getBoolean(PREFS_USE_ADBHOST));
} else if (changed.equals(PREFS_ADBHOST_VALUE)) {
@@ -458,6 +465,10 @@ public final class PrefsDialog {
"ADB connection time out (ms):", getFieldEditorParent());
addField(ife);
+ ife = new IntegerFieldEditor(PREFS_PROFILER_BUFFER_SIZE_MB,
+ "Profiler buffer size (MB):", getFieldEditorParent());
+ addField(ife);
+
dfe = new DirectoryFieldEditor("textSaveDir",
"Default text save dir:", getFieldEditorParent());
addField(dfe);