Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 200680 Details for
Bug 292408
[LTTng] Statistics View - Support for counters at Experiment level
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Correct the calculation of cumulative cpu time
0002-correction-of-Cumulative-CPU-time.-The-definition-is.patch (text/plain), 6.25 KB, created by
Mathieu Denis
on 2011-08-01 17:09:07 EDT
(
hide
)
Description:
Correct the calculation of cumulative cpu time
Filename:
MIME Type:
Creator:
Mathieu Denis
Created:
2011-08-01 17:09:07 EDT
Size:
6.25 KB
patch
obsolete
>From 282ae2ee3011127a51e4cd9a60a298cc43638b00 Mon Sep 17 00:00:00 2001 >From: ematden <mathieu.denis@ericsson.com> >Date: Fri, 29 Jul 2011 09:03:54 -0400 >Subject: [PATCH 2/2] correction of Cumulative CPU time. The definition is not respected yet though. > >--- > .../statistics/model/KernelStatisticsData.java | 47 ++++++++++++-------- > 1 files changed, 29 insertions(+), 18 deletions(-) > >diff --git a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/views/statistics/model/KernelStatisticsData.java b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/views/statistics/model/KernelStatisticsData.java >index e4c1b5f..2e89d6f 100644 >--- a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/views/statistics/model/KernelStatisticsData.java >+++ b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/views/statistics/model/KernelStatisticsData.java >@@ -603,13 +603,37 @@ public class KernelStatisticsData extends StatisticsData { > * #increase(org.eclipse.linuxtools.lttng.event.LttngEvent, > * org.eclipse.linuxtools.lttng.state.model.LttngTraceState, int) > */ >+ @SuppressWarnings("unused") > @Override > public void increase(LttngEvent event, LttngTraceState traceState, int values) { > try { > int j; // Increment > Long cpu = event.getCpuId(); > LttngProcessState process = traceState.getRunning_process().get(cpu); >- >+ >+ // Updating the cumulative CPU time >+ if ((values & Values.STATE_CUMULATIVE_CPU_TIME) != 0) { >+ if (process.getState().getProc_status().equals(ProcessStatus.LTTV_STATE_RUN) && !process.getState().getExec_mode().equals(ExecutionMode.LTTV_STATE_MODE_UNKNOWN)) { >+ long cumulativeCpuTime = process.getState().getCum_cpu_time(); >+ long delta = event.getTimestamp().getValue() - process.getState().getChange_LttTime(); >+ process.getState().setCum_cpu_time(cumulativeCpuTime + delta); >+ } >+ } >+ if ((values & Values.CUMULATIVE_CPU_TIME) != 0) { >+ if (!process.getState().getExec_mode().equals(ExecutionMode.LTTV_STATE_MODE_UNKNOWN)) { >+ long cumulativeCpuTime = process.getState().getCum_cpu_time(); >+ long delta = event.getTimestamp().getValue() - process.getState().getEntry_LttTime(); >+ long newCumulativeCpuTime = cumulativeCpuTime + delta; >+ process.getState().setCum_cpu_time(newCumulativeCpuTime); >+ } else if (process.getState().getProc_status().equals(ProcessStatus.LTTV_STATE_RUN) && !process.getState().getExec_mode().equals(ExecutionMode.LTTV_STATE_MODE_UNKNOWN)) { >+ long cumulativeCpuTime = process.getState().getCum_cpu_time(); >+ long delta = event.getTimestamp().getValue() - process.getState().getChange_LttTime(); >+ long newCumulativeCpuTime = cumulativeCpuTime + delta; >+ process.getState().setCum_cpu_time(newCumulativeCpuTime); >+ } >+ } >+ >+ // Getting normal paths > FixedArray[] paths = getNormalPaths(event, traceState, (int) traceState.getContext().getIdentifier()); > // Clone the paths to avoid conflict with the TraceSetPaths > FixedArray[] clonedPaths = new FixedArray[paths.length]; >@@ -638,18 +662,12 @@ public class KernelStatisticsData extends StatisticsData { > if ((values & Values.CUMULATIVE_CPU_TIME) != 0) { > if (!process.getState().getExec_mode().equals(ExecutionMode.LTTV_STATE_MODE_UNKNOWN)) { > long cumulativeCpuTime = process.getState().getCum_cpu_time(); >- long delta = event.getTimestamp().getValue() - process.getState().getEntry_LttTime(); >- long newCumulativeCpuTime = cumulativeCpuTime + delta; >- process.getState().setCum_cpu_time(newCumulativeCpuTime); >- node.getValue().cumulativeCpuTime += newCumulativeCpuTime; >- traceSetNode.getValue().cumulativeCpuTime += newCumulativeCpuTime; >+ node.getValue().cumulativeCpuTime += cumulativeCpuTime; >+ traceSetNode.getValue().cumulativeCpuTime += cumulativeCpuTime; > } else if (process.getState().getProc_status().equals(ProcessStatus.LTTV_STATE_RUN) && !process.getState().getExec_mode().equals(ExecutionMode.LTTV_STATE_MODE_UNKNOWN)) { > long cumulativeCpuTime = process.getState().getCum_cpu_time(); >- long delta = event.getTimestamp().getValue() - process.getState().getChange_LttTime(); >- long newCumulativeCpuTime = cumulativeCpuTime + delta; >- process.getState().setCum_cpu_time(newCumulativeCpuTime); >- node.getValue().cumulativeCpuTime += newCumulativeCpuTime; >- traceSetNode.getValue().cumulativeCpuTime += newCumulativeCpuTime; >+ node.getValue().cumulativeCpuTime += cumulativeCpuTime; >+ traceSetNode.getValue().cumulativeCpuTime += cumulativeCpuTime; > } > } > if ((values & Values.ELAPSED_TIME) != 0) { >@@ -658,13 +676,6 @@ public class KernelStatisticsData extends StatisticsData { > traceSetNode.getValue().elapsedTime += event.getTimestamp().getValue() - process.getState().getEntry_LttTime(); > } > } >- if ((values & Values.STATE_CUMULATIVE_CPU_TIME) != 0) { >- if (process.getState().getProc_status().equals(ProcessStatus.LTTV_STATE_RUN) && !process.getState().getExec_mode().equals(ExecutionMode.LTTV_STATE_MODE_UNKNOWN)) { >- long cumulativeCpuTime = process.getState().getCum_cpu_time(); >- long delta = event.getTimestamp().getValue() - process.getState().getChange_LttTime(); >- process.getState().setCum_cpu_time(cumulativeCpuTime + delta); >- } >- } > } > } catch (Exception e) { > e.printStackTrace(); >-- >1.7.4.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 292408
:
200665
|
200680