Package se.sics.mspsim.profiler

Examples of se.sics.mspsim.profiler.SimpleProfiler


    if (di == null) {
      di = elf.getDebugInfo(pc + 1);
    }
    if (di == null) {
      /* Return PC value */
      SimpleProfiler sp = (SimpleProfiler)myCpu.getProfiler();
      try {
        MapEntry mapEntry = sp.getCallMapEntry(0);
        if (mapEntry != null) {
          String file = mapEntry.getFile();
          if (file != null) {
            if (file.indexOf('/') >= 0) {
              file = file.substring(file.lastIndexOf('/')+1);
View Full Code Here


      return getValue();
    }
  };
 
  public StackMonitor(MSP430 cpu) {
    SimpleProfiler profiler = cpu.getRegistry().getComponent(SimpleProfiler.class);
    if (profiler != null) {
        profiler.setStackMonitor(this);
        System.out.println("Found simple profiler!!!: " + profiler);
    } else {
        System.out.println("Could not find any suitable profiler");
    }
    if (cpu.getDisAsm() != null) {
View Full Code Here

  public void setMap(MapTable map) {
    this.map = map;
    /* When we got the map table we can also profile! */
    if (profiler == null) {
      setProfiler(new SimpleProfiler());
      profiler.setCPU(this);
    }
  }
View Full Code Here

          if (chipE2 == null) {
            context.err.println("Can not find chip: " + chip2[0]);
            return 1;
          }
          Profiler profiler = cpu.getProfiler();
          SimpleProfiler sprof = (SimpleProfiler) profiler;
          sprof.addProfileTag(context.getArgument(2), chipE1, chip1[1],
              chipE2, chip2[1]);
          return 0;
        }
      });     

      ch.registerCommand("printtags", new BasicCommand("print tags profile", "") {
        public int executeCommand(CommandContext context) {
          Profiler profiler = cpu.getProfiler();
          SimpleProfiler sprof = (SimpleProfiler) profiler;
          sprof.printTagProfile(context.out);
          return 0;
        }
      });     

     
      ch.registerCommand("logcalls", new BasicAsyncCommand("log function calls", "") {
        public int executeCommand(CommandContext context) {
          Profiler profiler = cpu.getProfiler();
          if (profiler == null) {
            context.err.println("No profiler found.");
            return 1;
          }
          profiler.setLogger(context.out);
          return 0;
        }
        public void stopCommand(CommandContext context) {
          Profiler profiler = cpu.getProfiler();
          if (profiler != null) {
            profiler.setLogger(null);
          }
        }
      });
     
      ch.registerCommand("profiler", new BasicCommand("configure profiler",
          "<command> <arguments>") {
            public int executeCommand(CommandContext context) {
              // TODO: add more API's to the Profiler???
              SimpleProfiler profiler = (SimpleProfiler) cpu.getProfiler();
              if (profiler == null) {
                context.err.println("No profiler found.");
                return 1;
              }
              String cmd = context.getArgument(0);
              if ("hide".equals(cmd)) {
                for (int j = 1, n = context.getArgumentCount(); j < n; j++) {
                  profiler.addIgnoreFunction(context.getArgument(j));
                }
              } else if ("hideirq".equals(cmd)) {
                profiler.setHideIRQ(context.getArgumentAsBoolean(1));
              }
              return 0;
            }
      });
     
View Full Code Here

    if (di == null) {
      di = elf.getDebugInfo(pc + 1);
    }
    if (di == null) {
      /* Return PC value */
      SimpleProfiler sp = (SimpleProfiler)myCpu.getProfiler();
      try {
        MapEntry mapEntry = sp.getCallMapEntry(0);
        if (mapEntry != null) {
          String file = mapEntry.getFile();
          if (file != null) {
            if (file.indexOf('/') >= 0) {
              file = file.substring(file.lastIndexOf('/')+1);
View Full Code Here

TOP

Related Classes of se.sics.mspsim.profiler.SimpleProfiler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.