This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

java ClassNotFoundException CodeCoverageActivityProvider during script.getServer("DVTServer.1")

Other Parts Discussed in Thread: CCSTUDIO

Hi,

we're trying to run a function profile analysis on a TDF file using Java.

during

DVTServer dvtServer = (DVTServer) script.getServer("DVTServer.1");

We receive the following class not found exception:

java.lang.ClassNotFoundException: com.ti.dvt.codecoverage.af.activity.CodeCoverageActivityProvider at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.ti.dvt.engine.scripting.DVTServer.createInstance(DVTServer.java:481)
at com.ti.dvt.engine.scripting.DVTServer.getActivityProviders(DVTServer.java:667)
at com.ti.dvt.control.engine.core.ControlEngine.setActivityProviderList(ControlEngine.java:79)
at com.ti.dvt.engine.scripting.DVTServer.start(DVTServer.java:737)
at com.ti.dvt.engine.scripting.DVTServer.<init>(DVTServer.java:102)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.ti.ccstudio.scripting.environment.ScriptingEnvironment.getServer(ScriptingEnvironment.java:1184)
at AutomaticTrace.analysis(AutomaticTrace.java:776)

I can't find the class CodeCoverageActivityProvider in any of the provided jar files. We're using CCS5.5.0.00077_linux

Any proposal/idea?

Best Regards,

Florian.

  • Hi Florian,

    What is the target you are using?

    Thanks

    ki

  • Hi,

    the target is a K2 connected to a Spectrum Digital XDS Pro via LAN. The Java code is running under Linux. 

    Best Regards,

    Florian.

  • Note that the CCS Code Coverage tool is only supported on a select few simulators (mostly C6x). It is not supported on any HW target.

    http://processors.wiki.ti.com/index.php/FAQ_-_CCSv5#Q:_What_targets_support_CCS_code_coverage.3F

  • Hi,

    I don't want to analyze the code coverage at all. I just want to run a functional profile of a already generated tdf.

    Best Regards,

    Florian.

     

  • Can you get the Function Profiler example in .\ccsv5\ccs_base\scripting\examples\DVTExamples\HardwareTraceAnalyzer\tdfExamples to work?

  • Hi,

    yes - it seems to run. Interesting is that is executes the code coverage in case of function profiling. Maybe this is exact the problem since code coverage is not supported for all targets. Can you please check?

    Best Regards,

    Florian.

    tdfExamples$ ../../../../bin/dss.sh jsFiles/FunctionProfile_TDF.js
    Function Profile for TDF
    ENTRY (com.ti.dvt.engine.scripting.DVTServer.start Mon Jun 02 16:59:39 CEST 2014)
    RETURN (com.ti.dvt.engine.scripting.DVTServer.start Mon Jun 02 16:59:39 CEST 2014)
    Opening TDF file
    JTRACE: GetConnectedCPUNames: channelServer = 0x9db5db0
    Running Code Coverage Analyzer
    Processing
    Exporting results to /home/demxupd2/ti/ccsv5/ccs_base/scripting/examples/DVTExamples/HardwareTraceAnalyzer/tdfExamples
    Shutting down
    ENTRY (com.ti.dvt.engine.scripting.DVTServer.stop Mon Jun 02 16:59:48 CEST 2014)
    Stopping DVTServer (com.ti.dvt.engine.scripting.DVTServer.disposeAndUnload Mon Jun 02 16:59:48 CEST 2014)
    RETURN (com.ti.dvt.engine.scripting.DVTServer.stop Mon Jun 02 16:59:48 CEST 2014)

  • Florian Oefelein said:
    yes - it seems to run. Interesting is that is executes the code coverage in case of function profiling. Maybe this is exact the problem since code coverage is not supported for all targets. Can you please check?

    The print message may say Code Coverage but the script itself is configured for function profiling. Also when using a tdf file as the source, the actual target does not matter.

    Can you zip and attach your script?

    Thanks

    ki

  • Hi Ki,

    I've attached the java source of the class we use to analyse the trace pod results. But maybe it would be a good idea to find out why the class CodeCoverageActivityProvider  is needed an where it is located...

    BR/Florian.

    TraceAnalysis.zip
  • Thank you for the example. I was able to reproduce the issue. Strange, that after the exception the application continues to run and data is exported successfully. I will continue to investigate and keep you posted

    ki

  • Hi Ki,

    thank for the response. Anyhow the hardware trace analyzing still does not work for me, the CSV will not be generated.

    How could we proceed to debug the problem. 

    With the CCS 5.3 this was running quite well, we did it using

    TraceAnalyzerSession traceAnalyzerSession = dvtServer.openTraceAnalyzerSession(tdfName, symbolFile);
    traceAnalyzerSession.runFunctionLevelProfile(outputDir + fileSeparator + "functionLevelProfiles");

    But the API has been changed with CCS 5.5 and we currently are not able to generate these files. 

    Could you please tell me how to do this in CCS 5.5?

    Best regards,

    Florian.

  • Hi,

    I've some more information...

    it seems that the trace analyzing scripting is working fine with CCS6 but we'have currently other problems with CCS6 which means that we still search for an solution in CCS5.5...

    Any support welcome...

    BR/Florian.

  • Florian Oefelein said:
    Could you please tell me how to do this in CCS 5.5?

    I pretty much used the TraceAnalysis.class example you attached (with some slight modifications to match my environment). I did comment out the part where a debug session is started because you don't need one. As you can see in my output, I get the error but the script continues and I get a csv file generated:

    C:\DSS_JAVA>"C:\Program Files (x86)\Java\jdk1.6.0_45\bin\javac" -cp C:\ti\ccsv5.
    5.0.00077\ccsv5\ccs_base\DebugServer\packages\ti\dss\java\com.ti.ccstudio.script
    ing.environment_3.1.0.jar;C:\ti\ccsv5.5.0.00077\ccsv5\ccs_base\DebugServer\packa
    ges\ti\dss\java\com.ti.debug.engine_1.0.0.jar;C:\ti\ccsv5.5.0.00077\ccsv5\ccs_ba
    se\DebugServer\packages\ti\dss\java\dss.jar;C:\ti\ccsv5.5.0.00077\ccsv5\ccs_base
    \dvt\scripting\dvt_scripting.jar TraceAnalysis.java

    C:\DSS_JAVA>set PATH=C:/ti/ccsv4.2.5.00005/xdctools_3_22_01_21;C:\Windows\system
    32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.
    0\;C:\Program Files (x86)\Toshiba\Bluetooth Toshiba Stack\sys\;C:\Program Files
    (x86)\Toshiba\Bluetooth Toshiba Stack\sys\x64\;C:\strawberry\c\bin;C:\strawberry
    \perl\site\bin;C:\strawberry\perl\bin;C:/ti/ccsv4.2.5.00005/xdctools_3_22_01_21;
    C:\ti\ccsv5.5.0.00077\ccsv5\ccs_base\common\bin;C:\ti\ccsv5.5.0.00077\ccsv5\ccs_
    base\common\uscif;C:\ti\ccsv5.5.0.00077\ccsv5\ccs_base\common\bin;C:\ti\ccsv5.5.
    0.00077\ccsv5\ccs_base\common\uscif;C:\ti\ccsv5.5.0.00077\ccsv5\ccs_base\common\
    bin;C:\ti\ccsv5.5.0.00077\ccsv5\ccs_base\common\uscif

    C:\DSS_JAVA>"C:\Program Files (x86)\Java\jdk1.6.0_45\bin\java" -cp ".";C:\ti\ccs
    v5.5.0.00077\ccsv5\ccs_base\DebugServer\packages\ti\dss\java\dss.jar;C:\ti\ccsv5
    .5.0.00077\ccsv5\ccs_base\DebugServer\packages\ti\dss\java;C:\ti\ccsv5.5.0.00077
    \ccsv5\ccs_base\dvt\scripting\dvt_scripting.jar TraceAnalysis
    Getting script instance...
    Getting dvt server
    java.lang.ClassNotFoundException: com.ti.dvt.codecoverage.af.activity.CodeCovera
    geActivityProvider
            at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:171)
            at com.ti.dvt.engine.scripting.DVTServer.createInstance(DVTServer.java:4
    81)
            at com.ti.dvt.engine.scripting.DVTServer.getActivityProviders(DVTServer.
    java:667)
            at com.ti.dvt.control.engine.core.ControlEngine.setActivityProviderList(
    ControlEngine.java:79)
            at com.ti.dvt.engine.scripting.DVTServer.start(DVTServer.java:737)
            at com.ti.dvt.engine.scripting.DVTServer.<init>(DVTServer.java:102)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
    orAccessorImpl.java:39)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
    onstructorAccessorImpl.java:27)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
            at com.ti.ccstudio.scripting.environment.ScriptingEnvironment.getServer(
    ScriptingEnvironment.java:1184)
            at TraceAnalysis.main(TraceAnalysis.java:47)
    RETURN (com.ti.dvt.engine.scripting.DVTServer.start Thu Jun 05 15:23:05 EDT 2014
    )
    Open trace analyzer session...
    JTRACE: GetConnectedCPUNames: channelServer = 0523CF20
    Trying to stop dvtServer
    ENTRY (com.ti.dvt.engine.scripting.DVTServer.stop Thu Jun 05 15:23:12 EDT 2014)
    Stopping DVTServer (com.ti.dvt.engine.scripting.DVTServer.disposeAndUnload Thu J
    un 05 15:23:12 EDT 2014)
    RETURN (com.ti.dvt.engine.scripting.DVTServer.stop Thu Jun 05 15:23:12 EDT 2014)

    Stopped dvtServer
    Trying to end debugSession

    I'll see if I can get someone from the DVT team to comment further on the changes made to the API

    Thanks

    ki

  • Florian,

    Follow these steps to install a CCS5.5 DVT patch which should resolve this problem:

    1. In CCS go to Help->Install New Software
    2. Click the "Add" button and add this dvt patch location: http://software-dl.ti.com/ccs/non-esd/dvt/ccs5.5
    3. Select DVT and follow through the menu to install

    Let us know if you have any issue with this.

    Regards,

    Imtaz.