SchedSwitchHandler: rename private methods
authorRaphaël Beamonte <raphael.beamonte@gmail.com>
Tue, 12 Apr 2016 20:34:44 +0000 (16:34 -0400)
committerAlexandre Montplaisir <alexmonthy@efficios.com>
Thu, 14 Apr 2016 16:14:51 +0000 (12:14 -0400)
The setNewProcessPrio and setNewProcessExecName methods
were respectively renamed setProcessPrio and
setProcessExecName as the 'New' part of the name can be
confusing with the 'next process' when handling a
sched_switch event. The parameters of those methods have
been renamed accordingly.

Change-Id: Id1c0f00f165e2d906cb7650d511b1bebc20d4b1e
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Reviewed-on: https://git.eclipse.org/r/70514
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-by: Hudson CI
Reviewed-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Tested-by: Alexandre Montplaisir <alexmonthy@efficios.com>
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernel/handlers/SchedSwitchHandler.java

index 52a83aab94b04161f9eff211cc575de2281e3745..d4d0ed35ea2cc30f3688ecf2caefc5dfeacd48aa 100644 (file)
@@ -72,16 +72,16 @@ public class SchedSwitchHandler extends KernelEventHandler {
         KernelEventHandlerUtils.setProcessToRunning(timestamp, newCurrentThreadNode, ss);
 
         /* Set the exec name of the former process */
-        setNewProcessExecName(ss, prevProcessName, formerThreadNode, timestamp);
+        setProcessExecName(ss, prevProcessName, formerThreadNode, timestamp);
 
         /* Set the exec name of the new process */
-        setNewProcessExecName(ss, nextProcessName, newCurrentThreadNode, timestamp);
+        setProcessExecName(ss, nextProcessName, newCurrentThreadNode, timestamp);
 
         /* Set the current prio for the former process */
-        setNewProcessPrio(ss, prevPrio, formerThreadNode, timestamp);
+        setProcessPrio(ss, prevPrio, formerThreadNode, timestamp);
 
         /* Set the current prio for the new process */
-        setNewProcessPrio(ss, nextPrio, newCurrentThreadNode, timestamp);
+        setProcessPrio(ss, nextPrio, newCurrentThreadNode, timestamp);
 
         /* Make sure the PPID and system_call sub-attributes exist */
         ss.getQuarkRelativeAndAdd(newCurrentThreadNode, Attributes.SYSTEM_CALL);
@@ -164,19 +164,19 @@ public class SchedSwitchHandler extends KernelEventHandler {
         ss.modifyAttribute(timestamp, value, quark);
     }
 
-    private static void setNewProcessPrio(ITmfStateSystemBuilder ss, Integer nextPrio, Integer newCurrentThreadNode, long timestamp) throws AttributeNotFoundException {
+    private static void setProcessPrio(ITmfStateSystemBuilder ss, Integer prio, Integer threadNode, long timestamp) throws AttributeNotFoundException {
         int quark;
         ITmfStateValue value;
-        quark = ss.getQuarkRelativeAndAdd(newCurrentThreadNode, Attributes.PRIO);
-        value = TmfStateValue.newValueInt(nextPrio);
+        quark = ss.getQuarkRelativeAndAdd(threadNode, Attributes.PRIO);
+        value = TmfStateValue.newValueInt(prio);
         ss.modifyAttribute(timestamp, value, quark);
     }
 
-    private static void setNewProcessExecName(ITmfStateSystemBuilder ss, String nextProcessName, Integer newCurrentThreadNode, long timestamp) throws AttributeNotFoundException {
+    private static void setProcessExecName(ITmfStateSystemBuilder ss, String processName, Integer threadNode, long timestamp) throws AttributeNotFoundException {
         int quark;
         ITmfStateValue value;
-        quark = ss.getQuarkRelativeAndAdd(newCurrentThreadNode, Attributes.EXEC_NAME);
-        value = TmfStateValue.newValueString(nextProcessName);
+        quark = ss.getQuarkRelativeAndAdd(threadNode, Attributes.EXEC_NAME);
+        value = TmfStateValue.newValueString(processName);
         ss.modifyAttribute(timestamp, value, quark);
     }
 
This page took 0.025355 seconds and 5 git commands to generate.