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;
|
package org.eclipse.dd.dsf.debug;
|
||||||
|
|
||||||
import org.eclipse.dd.dsf.service.IDsfService;
|
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;
|
package org.eclipse.dd.dsf.debug;
|
||||||
|
|
||||||
import java.util.Map;
|
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;
|
package org.eclipse.dd.dsf.debug;
|
||||||
|
|
||||||
import org.eclipse.dd.dsf.concurrent.Done;
|
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;
|
package org.eclipse.dd.dsf.debug;
|
||||||
|
|
||||||
import java.math.BigInteger;
|
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;
|
package org.eclipse.dd.dsf.debug;
|
||||||
|
|
||||||
import org.eclipse.dd.dsf.concurrent.Done;
|
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;
|
package org.eclipse.dd.dsf.debug;
|
||||||
|
|
||||||
import org.eclipse.dd.dsf.concurrent.Done;
|
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;
|
package org.eclipse.dd.dsf.debug;
|
||||||
|
|
||||||
import org.eclipse.dd.dsf.concurrent.GetDataDone;
|
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;
|
package org.eclipse.dd.dsf.debug;
|
||||||
|
|
||||||
import org.eclipse.dd.dsf.concurrent.Done;
|
import org.eclipse.dd.dsf.concurrent.Done;
|
||||||
|
@ -17,13 +27,6 @@ import org.eclipse.dd.dsf.model.IDataModelService;
|
||||||
*/
|
*/
|
||||||
public interface IRunControl extends 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
|
* Execution context is the object on which run control operations can be
|
||||||
* performed. A lot of higher-level services reference this context to build
|
* performed. A lot of higher-level services reference this context to build
|
||||||
|
@ -73,13 +76,6 @@ public interface IRunControl extends IDataModelService
|
||||||
IExecutionDMC getExecutionContext();
|
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.
|
* Display information for an execution context.
|
||||||
*/
|
*/
|
||||||
|
@ -103,7 +99,6 @@ public interface IRunControl extends IDataModelService
|
||||||
void suspend(IExecutionDMC context, Done done);
|
void suspend(IExecutionDMC context, Done done);
|
||||||
public enum StepType { STEP_OVER, STEP_INTO, STEP_RETURN };
|
public enum StepType { STEP_OVER, STEP_INTO, STEP_RETURN };
|
||||||
boolean isStepping(IExecutionDMC context);
|
boolean isStepping(IExecutionDMC context);
|
||||||
boolean isSteppingTimedOut(IExecutionDMC context);
|
|
||||||
boolean canStep(IExecutionDMC context);
|
boolean canStep(IExecutionDMC context);
|
||||||
void step(IExecutionDMC context, StepType stepType, Done done);
|
void step(IExecutionDMC context, StepType stepType, Done done);
|
||||||
boolean canInstructionStep(IExecutionDMC context);
|
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;
|
package org.eclipse.dd.dsf.debug;
|
||||||
|
|
||||||
import org.eclipse.dd.dsf.concurrent.GetDataDone;
|
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;
|
package org.eclipse.dd.dsf.debug;
|
||||||
|
|
||||||
import org.eclipse.dd.dsf.concurrent.GetDataDone;
|
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;
|
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;
|
import org.eclipse.dd.dsf.service.IDsfService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -11,7 +23,21 @@ import org.eclipse.dd.dsf.service.IDsfService;
|
||||||
* about to be executed.
|
* about to be executed.
|
||||||
*/
|
*/
|
||||||
public interface IStepQueueManager extends IDsfService {
|
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);
|
void setStepQueueDepth(int depth);
|
||||||
int getStepQueueDepth();
|
int getStepQueueDepth();
|
||||||
|
|
||||||
|
@ -24,8 +50,10 @@ public interface IStepQueueManager extends IDsfService {
|
||||||
/**
|
/**
|
||||||
* Checks whether a step command can be queued up for given context.
|
* 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.
|
* Adds a step command to the execution queue for given context.
|
||||||
* @param execCtx Execution context that should perform the step.
|
* @param execCtx Execution context that should perform the step.
|
||||||
|
@ -40,4 +68,6 @@ public interface IStepQueueManager extends IDsfService {
|
||||||
* @param stepType Type of step to execute.
|
* @param stepType Type of step to execute.
|
||||||
*/
|
*/
|
||||||
void enqueueInstructionStep(IRunControl.IExecutionDMC execCtx, IRunControl.StepType stepType);
|
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;
|
package org.eclipse.dd.dsf.debug;
|
||||||
|
|
||||||
import org.eclipse.dd.dsf.concurrent.GetDataDone;
|
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;
|
package org.eclipse.dd.dsf.debug;
|
||||||
|
|
||||||
import org.eclipse.dd.dsf.concurrent.Done;
|
import org.eclipse.dd.dsf.concurrent.Done;
|
||||||
|
|
|
@ -305,9 +305,9 @@ public class DsfSession
|
||||||
if (o1.fListener == o2.fListener) {
|
if (o1.fListener == o2.fListener) {
|
||||||
return 0;
|
return 0;
|
||||||
} if (o1.fListener instanceof IDsfService && !(o2.fListener instanceof IDsfService)) {
|
} 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;
|
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) ) {
|
} else if ( (o1.fListener instanceof IDsfService) && (o2.fListener instanceof IDsfService) ) {
|
||||||
return ((IDsfService)o1.fListener).getStartupNumber() - ((IDsfService)o2.fListener).getStartupNumber();
|
return ((IDsfService)o1.fListener).getStartupNumber() - ((IDsfService)o2.fListener).getStartupNumber();
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,6 +50,15 @@ public interface IDsfService {
|
||||||
*/
|
*/
|
||||||
DsfExecutor getExecutor();
|
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
|
* Returns a filter string that can be used to uniquely identify this
|
||||||
* service. This filter string should be based on the properties and class
|
* service. This filter string should be based on the properties and class
|
||||||
|
|
Loading…
Add table
Reference in a new issue