From d7de88745021c19ed10a5ef88fd2757c70a02b65 Mon Sep 17 00:00:00 2001 From: "jaewon81.lim" Date: Thu, 16 Jun 2011 18:27:49 +0900 Subject: [PATCH] modify for profiling tool installation (mount root file system for installation, delete routine of removing profiling tool) --- .../oprofile/launch/SLPOprofileLaunchDelegate.java | 12 ++++++++---- .../valgrind/launch/SLPValgrindLaunchDelegate.java | 12 ++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/org.eclipse.linuxtools.oprofile.launch.exe/src/com/samsung/linuxplatform/oprofile/launch/SLPOprofileLaunchDelegate.java b/org.eclipse.linuxtools.oprofile.launch.exe/src/com/samsung/linuxplatform/oprofile/launch/SLPOprofileLaunchDelegate.java index 2521278..b336ba4 100644 --- a/org.eclipse.linuxtools.oprofile.launch.exe/src/com/samsung/linuxplatform/oprofile/launch/SLPOprofileLaunchDelegate.java +++ b/org.eclipse.linuxtools.oprofile.launch.exe/src/com/samsung/linuxplatform/oprofile/launch/SLPOprofileLaunchDelegate.java @@ -294,13 +294,13 @@ public class SLPOprofileLaunchDelegate extends SLPLaunchDelegate { String result = session.run(command, null); if(!result.contains("0")) throw new Exception(Messages.getString("ProfileLaunch.FAIL_TO_INSTALL"), new Exception("command is " + command)); + monitor.worked(1); - // remove old application - command = PKG_TOOL_CMD + PKG_TOOL_REMOVE_OPTION + PACKAGE_NAME + CMD_RESULT_CHECK ; + // remount file system + command = "mount -o remount,rw /" + CMD_RESULT_CHECK; result = session.run(command, null); if(!result.contains("0")) - throw new Exception(Messages.getString("ProfileLaunch.FAIL_TO_INSTALL"), new Exception("command is " + command)); - monitor.worked(1); + throw new Exception(Messages.getString("ProfileLaunch.FAIL_TO_INSTALL"), new Exception("command is " + command)); // install new application command = PKG_TOOL_CMD + PKG_TOOL_INSTALL_OPTION + PACKAGE_FILENAME_ARM + CMD_RESULT_CHECK; @@ -308,6 +308,10 @@ public class SLPOprofileLaunchDelegate extends SLPLaunchDelegate { if(!result.contains("0")) throw new Exception(Messages.getString("ProfileLaunch.FAIL_TO_INSTALL"), new Exception("command is " + command)); monitor.worked(1); + + // remount file system + command = "mount -o remount,ro /" + CMD_RESULT_CHECK; + result = session.run(command, null); } catch (Exception e) { throw e; } finally { diff --git a/org.eclipse.linuxtools.valgrind.launch.exe/src/org/eclipse/linuxtools/valgrind/launch/SLPValgrindLaunchDelegate.java b/org.eclipse.linuxtools.valgrind.launch.exe/src/org/eclipse/linuxtools/valgrind/launch/SLPValgrindLaunchDelegate.java index 2869a35..f956bb3 100644 --- a/org.eclipse.linuxtools.valgrind.launch.exe/src/org/eclipse/linuxtools/valgrind/launch/SLPValgrindLaunchDelegate.java +++ b/org.eclipse.linuxtools.valgrind.launch.exe/src/org/eclipse/linuxtools/valgrind/launch/SLPValgrindLaunchDelegate.java @@ -327,14 +327,14 @@ public class SLPValgrindLaunchDelegate extends SLPLaunchDelegate { if(!result.contains("0")) newCoreException(Messages.getString("ProfileLaunch.FAIL_TO_INSTALL"), new Exception("command is " + command)); - - // remove old application - command = PKG_TOOL_CMD + PKG_TOOL_REMOVE_OPTION + PACKAGE_NAME + CMD_RESULT_CHECK ; + monitor.worked(1); + + // remount file system + command = "mount -o remount,rw /" + CMD_RESULT_CHECK; result = session.run(command, null); if(!result.contains("0")) newCoreException(Messages.getString("ProfileLaunch.FAIL_TO_INSTALL"), new Exception("command is " + command)); - monitor.worked(1); // install new application command = PKG_TOOL_CMD + PKG_TOOL_INSTALL_OPTION + PACKAGE_FILENAME_ARM + CMD_RESULT_CHECK; @@ -343,6 +343,10 @@ public class SLPValgrindLaunchDelegate extends SLPLaunchDelegate { newCoreException(Messages.getString("ProfileLaunch.FAIL_TO_INSTALL"), new Exception("command is " + command)); monitor.worked(1); + + // remount file system + command = "mount -o remount,ro /" + CMD_RESULT_CHECK; + result = session.run(command, null); } catch (CoreException e) { throw e; } catch (Exception e) { -- 2.7.4