From 622acf0254cb97c536d75e1d6a9da4dc488f4f8b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Beamonte?= Date: Tue, 12 Apr 2016 16:34:44 -0400 Subject: [PATCH] SchedSwitchHandler: rename private methods MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Reviewed-on: https://git.eclipse.org/r/70514 Reviewed-by: Matthew Khouzam Reviewed-by: Hudson CI Reviewed-by: Alexandre Montplaisir Tested-by: Alexandre Montplaisir --- .../kernel/handlers/SchedSwitchHandler.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernel/handlers/SchedSwitchHandler.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernel/handlers/SchedSwitchHandler.java index 52a83aab94..d4d0ed35ea 100644 --- a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernel/handlers/SchedSwitchHandler.java +++ b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernel/handlers/SchedSwitchHandler.java @@ -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); } -- 2.34.1