1 /*******************************************************************************
2 * Copyright (c) 2015 Ericsson
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Matthew Khouzam - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.tracecompass
.internal
.analysis
.os
.linux
.core
.kernel
.handlers
;
15 import org
.eclipse
.tracecompass
.analysis
.os
.linux
.core
.trace
.IKernelAnalysisEventLayout
;
16 import org
.eclipse
.tracecompass
.statesystem
.core
.ITmfStateSystemBuilder
;
17 import org
.eclipse
.tracecompass
.statesystem
.core
.exceptions
.AttributeNotFoundException
;
18 import org
.eclipse
.tracecompass
.tmf
.core
.event
.ITmfEvent
;
21 * Process free event handler
23 public class ProcessFreeHandler
extends KernelEventHandler
{
31 public ProcessFreeHandler(IKernelAnalysisEventLayout layout
) {
36 public void handleEvent(ITmfStateSystemBuilder ss
, ITmfEvent event
) throws AttributeNotFoundException
{
38 Integer tid
= ((Long
) event
.getContent().getField(getLayout().fieldTid()).getValue()).intValue();
40 * Remove the process and all its sub-attributes from the current state
42 int quark
= ss
.getQuarkRelativeAndAdd(KernelEventHandlerUtils
.getNodeThreads(ss
), tid
.toString());
43 ss
.removeAttribute(KernelEventHandlerUtils
.getTimestamp(event
), quark
);