mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Optimized stepping performance.
This commit is contained in:
parent
32b8c9157f
commit
71db7fdfe2
15 changed files with 163 additions and 19 deletions
|
@ -1,3 +1,13 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006 Wind River Systems and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Wind River Systems - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.dd.dsf.debug;
|
||||
|
||||
import org.eclipse.dd.dsf.service.IDsfService;
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006 Wind River Systems and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Wind River Systems - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.dd.dsf.debug;
|
||||
|
||||
import java.util.Map;
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006 Wind River Systems and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Wind River Systems - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.dd.dsf.debug;
|
||||
|
||||
import org.eclipse.dd.dsf.concurrent.Done;
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006 Wind River Systems and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Wind River Systems - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.dd.dsf.debug;
|
||||
|
||||
import java.math.BigInteger;
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006 Wind River Systems and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Wind River Systems - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.dd.dsf.debug;
|
||||
|
||||
import org.eclipse.dd.dsf.concurrent.Done;
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006 Wind River Systems and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Wind River Systems - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.dd.dsf.debug;
|
||||
|
||||
import org.eclipse.dd.dsf.concurrent.Done;
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006 Wind River Systems and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Wind River Systems - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.dd.dsf.debug;
|
||||
|
||||
import org.eclipse.dd.dsf.concurrent.GetDataDone;
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006 Wind River Systems and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Wind River Systems - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.dd.dsf.debug;
|
||||
|
||||
import org.eclipse.dd.dsf.concurrent.Done;
|
||||
|
@ -17,13 +27,6 @@ import org.eclipse.dd.dsf.model.IDataModelService;
|
|||
*/
|
||||
public interface IRunControl extends IDataModelService
|
||||
{
|
||||
/**
|
||||
* Amount of time in seconds, that it takes the ISteppingTimedOutEvent event to
|
||||
* be issued after a step is started.
|
||||
* @see ISteppingTimedOutEvent
|
||||
*/
|
||||
public final static int STEPPING_TIMEOUT = 5;
|
||||
|
||||
/**
|
||||
* Execution context is the object on which run control operations can be
|
||||
* performed. A lot of higher-level services reference this context to build
|
||||
|
@ -73,13 +76,6 @@ public interface IRunControl extends IDataModelService
|
|||
IExecutionDMC getExecutionContext();
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates that the given context has been stepping for some time,
|
||||
* and the UI (views and actions) may need to be updated accordingly.
|
||||
*/
|
||||
public interface ISteppingTimedOutEvent extends IDataModelEvent<IExecutionDMC> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Display information for an execution context.
|
||||
*/
|
||||
|
@ -103,7 +99,6 @@ public interface IRunControl extends IDataModelService
|
|||
void suspend(IExecutionDMC context, Done done);
|
||||
public enum StepType { STEP_OVER, STEP_INTO, STEP_RETURN };
|
||||
boolean isStepping(IExecutionDMC context);
|
||||
boolean isSteppingTimedOut(IExecutionDMC context);
|
||||
boolean canStep(IExecutionDMC context);
|
||||
void step(IExecutionDMC context, StepType stepType, Done done);
|
||||
boolean canInstructionStep(IExecutionDMC context);
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006 Wind River Systems and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Wind River Systems - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.dd.dsf.debug;
|
||||
|
||||
import org.eclipse.dd.dsf.concurrent.GetDataDone;
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006 Wind River Systems and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Wind River Systems - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.dd.dsf.debug;
|
||||
|
||||
import org.eclipse.dd.dsf.concurrent.GetDataDone;
|
||||
|
|
|
@ -1,5 +1,17 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006 Wind River Systems and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Wind River Systems - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.dd.dsf.debug;
|
||||
|
||||
import org.eclipse.dd.dsf.debug.IRunControl.IExecutionDMC;
|
||||
import org.eclipse.dd.dsf.model.IDataModelEvent;
|
||||
import org.eclipse.dd.dsf.service.IDsfService;
|
||||
|
||||
/**
|
||||
|
@ -11,6 +23,20 @@ import org.eclipse.dd.dsf.service.IDsfService;
|
|||
* about to be executed.
|
||||
*/
|
||||
public interface IStepQueueManager extends IDsfService {
|
||||
/**
|
||||
* Amount of time in miliseconds, that it takes the ISteppingTimedOutEvent
|
||||
* event to be issued after a step is started.
|
||||
* @see ISteppingTimedOutEvent
|
||||
*/
|
||||
public final static int STEPPING_TIMEOUT = 500;
|
||||
|
||||
/**
|
||||
* Indicates that the given context has been stepping for some time,
|
||||
* and the UI (views and actions) may need to be updated accordingly.
|
||||
*/
|
||||
public interface ISteppingTimedOutEvent extends IDataModelEvent<IExecutionDMC> {
|
||||
}
|
||||
|
||||
|
||||
void setStepQueueDepth(int depth);
|
||||
int getStepQueueDepth();
|
||||
|
@ -24,7 +50,9 @@ public interface IStepQueueManager extends IDsfService {
|
|||
/**
|
||||
* Checks whether a step command can be queued up for given context.
|
||||
*/
|
||||
void canEnqueueStep(IRunControl.IExecutionDMC execCtx);
|
||||
boolean canEnqueueStep(IRunControl.IExecutionDMC execCtx);
|
||||
|
||||
boolean canEnqueueInstructionStep(IRunControl.IExecutionDMC execCtx);
|
||||
|
||||
/**
|
||||
* Adds a step command to the execution queue for given context.
|
||||
|
@ -40,4 +68,6 @@ public interface IStepQueueManager extends IDsfService {
|
|||
* @param stepType Type of step to execute.
|
||||
*/
|
||||
void enqueueInstructionStep(IRunControl.IExecutionDMC execCtx, IRunControl.StepType stepType);
|
||||
|
||||
boolean isSteppingTimedOut(IExecutionDMC context);
|
||||
}
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006 Wind River Systems and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Wind River Systems - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.dd.dsf.debug;
|
||||
|
||||
import org.eclipse.dd.dsf.concurrent.GetDataDone;
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006 Wind River Systems and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Wind River Systems - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.dd.dsf.debug;
|
||||
|
||||
import org.eclipse.dd.dsf.concurrent.Done;
|
||||
|
|
|
@ -305,9 +305,9 @@ public class DsfSession
|
|||
if (o1.fListener == o2.fListener) {
|
||||
return 0;
|
||||
} if (o1.fListener instanceof IDsfService && !(o2.fListener instanceof IDsfService)) {
|
||||
return Integer.MAX_VALUE;
|
||||
} else if (o2.fListener instanceof IDsfService && !(o1.fListener instanceof IDsfService)) {
|
||||
return Integer.MIN_VALUE;
|
||||
} else if (o2.fListener instanceof IDsfService && !(o1.fListener instanceof IDsfService)) {
|
||||
return Integer.MAX_VALUE;
|
||||
} else if ( (o1.fListener instanceof IDsfService) && (o2.fListener instanceof IDsfService) ) {
|
||||
return ((IDsfService)o1.fListener).getStartupNumber() - ((IDsfService)o2.fListener).getStartupNumber();
|
||||
}
|
||||
|
|
|
@ -50,6 +50,15 @@ public interface IDsfService {
|
|||
*/
|
||||
DsfExecutor getExecutor();
|
||||
|
||||
/**
|
||||
* Returns the map of properties that this service was registered with.
|
||||
* <br>
|
||||
* TODO: is returning the properties and service filter redundant? Should
|
||||
* getServiceFilter() be removed from the interface since it can be generated
|
||||
* from the properties?
|
||||
*/
|
||||
Dictionary getProperties();
|
||||
|
||||
/**
|
||||
* Returns a filter string that can be used to uniquely identify this
|
||||
* service. This filter string should be based on the properties and class
|
||||
|
|
Loading…
Add table
Reference in a new issue