• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java AddressOps类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中sun.jvm.hotspot.utilities.AddressOps的典型用法代码示例。如果您正苦于以下问题:Java AddressOps类的具体用法?Java AddressOps怎么用?Java AddressOps使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AddressOps类属于sun.jvm.hotspot.utilities包,在下文中一共展示了AddressOps类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: sort

import sun.jvm.hotspot.utilities.AddressOps; //导入依赖的package包/类
/** Sort the line number information by increasing starting program
    counter. This must be done before any queries are made. */
public void sort() {
  if (infoList == null) return;
  Collections.sort(infoList, new Comparator() {
      public int compare(Object o1, Object o2) {
        BasicLineNumberInfo l1 = (BasicLineNumberInfo) o1;
        BasicLineNumberInfo l2 = (BasicLineNumberInfo) o2;
        Address a1 = l1.getStartPC();
        Address a2 = l2.getStartPC();
        if (AddressOps.lt(a1, a2)) { return -1; }
        if (AddressOps.gt(a1, a2)) { return 1; }
        return 0;
      }
    });
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:17,代码来源:BasicLineNumberMapping.java


示例2: searchLineNumbers

import sun.jvm.hotspot.utilities.AddressOps; //导入依赖的package包/类
private BasicLineNumberInfo searchLineNumbers(Address addr, int lowIdx, int highIdx) {
  if (highIdx < lowIdx) return null;
  if (lowIdx == highIdx) {
    // Base case: see whether start PC is less than or equal to addr
    if (check(addr, lowIdx)) {
      return get(lowIdx);
    } else {
      return null;
    }
  } else if (lowIdx == highIdx - 1) {
    if (check(addr, lowIdx)) {
      return get(lowIdx);
    } else if (check(addr, highIdx)) {
      return get(highIdx);
    } else {
      return null;
    }
  }
  int midIdx = (lowIdx + highIdx) >> 1;
  BasicLineNumberInfo info = get(midIdx);
  if (AddressOps.lt(addr, info.getStartPC())) {
    // Always move search down
    return searchLineNumbers(addr, lowIdx, midIdx);
  } else if (AddressOps.equal(addr, info.getStartPC())) {
    return info;
  } else {
    // Move search up
    return searchLineNumbers(addr, midIdx, highIdx);
  }
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:31,代码来源:BasicLineNumberMapping.java


示例3: check

import sun.jvm.hotspot.utilities.AddressOps; //导入依赖的package包/类
private boolean check(Address addr, int idx) {
  BasicLineNumberInfo info = get(idx);
  if (AddressOps.lte(info.getStartPC(), addr)) {
    return true;
  } else {
    return false;
  }
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:9,代码来源:BasicLineNumberMapping.java


示例4: resolve

import sun.jvm.hotspot.utilities.AddressOps; //导入依赖的package包/类
public void resolve(ResolveListener listener) {
  if (Assert.ASSERTS_ENABLED) {
    Assert.that(state == CONSTRUCTION_STATE, "wrong state");
  }
  // Go through all types in lazyTypeMap and types.
  // Resolve all LazyTypes.
  resolveLazyMap(listener);
  for (ListIterator iter = types.listIterator(); iter.hasNext(); ) {
    BasicType t = (BasicType) iter.next();
    BasicType t2 = (BasicType) t.resolveTypes(this, listener);
    if (t != t2) {
      iter.set(t2);
    }
  }
  // Go through all symbols and resolve references to types and
  // references to other symbols
  for (Iterator iter = blocks.iterator(); iter.hasNext(); ) {
    ((BasicSym) iter.next()).resolve(this, listener);
  }
  for (Iterator iter = nameToSymMap.values().iterator(); iter.hasNext(); ) {
    ((BasicSym) iter.next()).resolve(this, listener);
  }

  // Sort blocks in ascending order of starting address (but do not
  // change ordering among blocks with the same starting address)
  Collections.sort(blocks, new Comparator() {
      public int compare(Object o1, Object o2) {
        BlockSym b1 = (BlockSym) o1;
        BlockSym b2 = (BlockSym) o2;
        Address a1 = b1.getAddress();
        Address a2 = b2.getAddress();
        if (AddressOps.lt(a1, a2)) { return -1; }
        if (AddressOps.gt(a1, a2)) { return 1; }
        return 0;
      }
    });

  state = RESOLVED_STATE;
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:40,代码来源:BasicCDebugInfoDataBase.java


示例5: loadObjectContainingPC

import sun.jvm.hotspot.utilities.AddressOps; //导入依赖的package包/类
public LoadObject loadObjectContainingPC(Address pc) throws DebuggerException {
  // FIXME: could keep sorted list of these to be able to do binary
  // searches, for better scalability
  if (pc == null) {
    return null;
  }
  List objs = getLoadObjectList();
  for (Iterator iter = objs.iterator(); iter.hasNext(); ) {
    LoadObject obj = (LoadObject) iter.next();
    if (AddressOps.lte(obj.getBase(), pc) && (pc.minus(obj.getBase()) < obj.getSize())) {
      return obj;
    }
  }
  return null;
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:16,代码来源:WindbgCDebugger.java


示例6: sortLiveRegions

import sun.jvm.hotspot.utilities.AddressOps; //导入依赖的package包/类
private void sortLiveRegions(List liveRegions) {
  Collections.sort(liveRegions, new Comparator() {
    public int compare(Object o1, Object o2) {
      Address a1 = (Address)o1;
      Address a2 = (Address)o2;
      return AddressOps.lt(a1, a2)?-1:(AddressOps.gt(a1, a2)?1:0);
    }
  });
}
 
开发者ID:geoff-addepar,项目名称:heap-dump,代码行数:10,代码来源:FastObjectHeap.java



注:本文中的sun.jvm.hotspot.utilities.AddressOps类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java YAMLMapping类代码示例发布时间:2022-05-22
下一篇:
Java HttpTransportMetricsImpl类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap