[讨论] 自由讨论帖/建议帖/资料补充帖/马克帖(谢绝纯水)
RednaxelaFX
2010-05-08
马克一个老帖的回复
Henrik Ståhl是JRockit的一个PM,在TheServerSide的一帖里回复道: Henrik Ståhl 写道 Indeed. This is a pleasant exercise for the combined JRockit and HotSpot teams :-)
If you have followed the public announcement you already know that our plan is to carry both forward and merge the technologies over the long term. The exact method and timeframe is not clear yet. These are early days and we need to get the development teams time to do the due diligience - the code bases are quite different and both have strong and weak points. Luckily, our new ex-Sun colleagues have experience in merging code bases from previous acquisitions. OpenJDK will remain the single open source Java and JVM implementation that Oracle contributes to. Open sourcing the current JRockit code base simply does not make sense. Better focus our efforts on the future unified offering which will be a merge of some kind between the two technologies. Another thing worth mentioning here is that some features in JRockit do not make sense as part of an open source JVM. One example is integration with the Fusion Middleware logging infrastructure - definitely not of interest outside of an Oracle context. The open source codebase should not be polluted by such proprietary extensions. I don't have an answer to how to accomplish this yet, but it's possible that the modularity work in JDK7 can help. I fully understand that the community is anxious to know the details of where this is heading but I must plead for patience. Our clear goal is to keep Java strong and vibrant for the benefit of Oracle, our customers, partners and the community (including our esteemed competitors). The role of steward of the Java community and provider of the reference implementation is new to us and we don't want to upset anyone by rocking the boat. Regards, Henrik Ståhl Director PM, JRockit Products speaking for the combined Oracle and Sun JVM teams |
|
RednaxelaFX
2010-05-12
原来Intel还出过一套Open CLI Library的库,实现了CLI的库的部分,作用类似GNU Classpath。不过跟ORP一样都是“年老失修”了
一些Rubinius链接帖: Rubinius wants to help YOU make Ruby better Making Ruby Fast: The Rubinius JIT Improving the Rubinius Bytecode Compiler Compiling Ruby: From Text to Bytecode 5 Things You'll Love About Rubinius Rubinius: The Book Tour Ruby Garbage Collection Elise Huard 写道 I found this thread in the ruby-lang mailing list very interesting. Next quotes are enlightening:
In particular, the GC algorithms in MRI and YARV are specifically designed with the assumption that they will never actually run in 99.999% of all cases. They are designed for scripting, where a script doesn't even allocate enough memory to trigger a collection, runs for a couple of seconds and then exits, after which the OS simply reclaims the memory: no GC needed. That's why YARV and especially MRI are so exceptionally bad for server loads. It's also why REE can never be merged into mainline. (Jorg W. Mittag Aug 21 2010) 99.999% is a bit over-exaggerated, but it is true that garbage collection algorithm of YARV and MRI focus for throughput on non-memory extensive short-running programs, and GC of REE is not suitable for those programs. (Matz Aug 21 2010) Scripting was the original use case for ruby, so that's understandable. It explains a lot. |
|
RednaxelaFX
2010-05-24
Dr Drobbs上一篇1998年的关于JVM GC的文章:
Java Garbage Collection for Real-Time Systems 提到Sun JDK至少到1.1.4都在用一种保守式的mark-compact GC算法,对栈上数据做保守扫描而对堆上数据做准确扫描。为了方便对象的移动(“重定位”)而采用了一层间接的handle来引用对象。 从1.1开始类数据也由GC管理,不再被使用到的类可以被自动卸载,不过系统类(java.*之类由启动类加载器加载的类)不会被卸载。 The Java HotSpot Performance Engine: An In-Depth Look 引用 The Java HotSpot VM also eliminates the concept of "handles," an indirection facility used to access objects in memory. This both reduces memory usage and speeds processing. "A traditional representation of objects is that when you have one object that points to another," says Stoutamire, "it has a pointer to the header of that other object. But the classic virtual machine uses a different representation, where, instead of pointing directly to the object, it points into a table. And the header of the object is in that table, as well as a pointer to where the fields of the object are."
Such indirection is particularly useful in terms of relocating objects in memory, which often comes into play during garbage collection (see below). "If object A conceptually points to object B," explains Stoutamire, "what it really does is point into the handle table. Suppose that object A points to the fourth entry in the table, and the fourth entry in the table has a pointer to object B. Now, when I move object B, all I have to do for object A is update the entry in the table. That's not so useful if I only have a single object pointing to B, but if I have 1000 objects pointing to it (or I'm not sure where all the pointers are), then all I have to do is update that single entry when I move object B." While the use of handles brings greater ease of processing, such indirection is considerably slower, and the table takes up more space in memory. Further, the handle table's primary reason for being, to better facilitate object relocation in memory during garbage collection, has also since been shown to be less than necessary. "In practice, it isn't much more expensive to simply update all pointers during object relocation," says Stoutamire. "In order to do proper garbage collection, you have to trace through the entire heap anyway—you have to go through every pointer. So the fact that you're visiting every pointer anyway, means that you have the opportunity to change it right then and there, without doing much extra work." Finally, because the Java HotSpot VM uses direct memory references, it doesn't have to set up a memory-referencing handle when allocating memory, and it doesn't have to manage handles in addition to managing object memory. That makes the allocation of temporary data structures as fast as C's stack-based memory allocations, which is a big win. ...... Pre-Java HotSpot VM Many Java virtual machines use "conservative" or partially-accurate collectors. A conservative collector assumes that anything that looks like a valid pointer may actually be a pointer. Conservative collectors are easier to implement, but a conservative collector doesn't always know for certain where all object references are in memory. As a result, it can, in rare instances, make mistakes—such as confusing an integer for an object pointer— which can create difficult-to-debug memory leaks. Also, a conservative collector has to either use handles to refer indirectly to objects, or avoid relocating objects, since relocating handleless objects requires updating all references to the object and the conservative collector can't even be certain that an apparent reference is in fact real. This inability to relocate objects, in turn, results in memory fragmentation, and prevents the use of more sophisticated garbage collection algorithms. Conservative garbage collection also has a negative impact in the realm of native methods. "A conservative garbage collector has to make sure that it doesn't move anything that's pointed to from outside of the Java code," explains Stoutamire. "And that means that you have to scan areas of memory, looking for pointers into your heap—and that all takes time." This was one of the problems faced in using Java's old Native Method Interface (NMI) specification. Ironically, this difficulty was solved through the use of a different kind of handles. "With the Java 1.1 platform," says Stoutamire, NMI was replaced with Java Native Interface (JNI). With JNI, you never point from the outside to Java objects directly, you only point to handles, which then point to the objects. That means that the garbage collector doesn't have to worry about what's going on on the outside. But handles are only used to the extent that native code wants to point into the VM," he says. "It's no less efficient than the old way and allows for far more efficient garbage collection. So if you want to use the Java 2 platform and, hence, the Java HotSpot VM, you have to be using JNI." devx上Tony在2004年写的介绍文: Garbage Collection in the Java HotSpot Virtual Machine |
|
RednaxelaFX
2010-05-26
Android Developers上一篇新文简单介绍了Dan Bornstein写的Dalvik JIT
Harmony早期讨论的一些马克: Steve Blackburn Re: [modules] classloader/jit interface 其实JamVM真的很“simple”么……?拼JIT编译器的优化程度或者是GC的优化程度的话确实是比较simple,不过解释器的部分还是花了很多功夫的。 OpenJIT的文档。可以看到1.0/1.1系的Sun JDK的JIT编译器API的资料。 OpenJIT Backend Compiler (Runtime) Internal Specification version 1.1.7 Archive: Java Development Kit (JDK) 这JDK 1.0.2的页面居然还活着…但里面的内容果然已经死了 T T http://ftp.vim.org/languages/java/jdk/ 老Linux版JDK可以从这里抓 Java 1.0.2 locker Web resources MIT保留的JDK 1.0.2资源 Integrating Java with C++ JDK 1.0.2时代的C++/Java互操作文章。有趣的是提到Java 1.0.2的GC不会移动对象。 The Java Virtual Machine Specification 这是第一版JVM规范?怎么看起来好像更老 A study of the cache and branch performance issues with running Java on current hardware platforms IEEE上的论文,回头找来读读 JavaWorld: Can HotSpot jumpstart your Java applications? (1999-06) Release Notes JavaTM 2 SDK, Standard Edition, v. 1.2.2-001 for SCO® Operating Systems When the JIT is running, Java frames are allocated on the "native" thread stack (the size of which is governed by the java -Xss option), while when the JIT is not running, Java frames are allocated on the "Java" thread stack (the size of which is governed by the java -Xoss option). Since these stacks have different default sizes (128k and 400k respectively), it is possible for an application to experience a StackOverflowError exception when the JIT is running but not otherwise. If this happens, adjust the native thread stack size accordingly. 可以窥视到早期JDK中-Xss与-Xoss的作用。现在的Sun HotSpot里-Xoss则完全无作用(Azul HotSpot里或许还有作用,hmm)。 一个可以应用在Sun JDK 1.0.2上的patch On-line JavaTM Data Traces 提到1.0、1.1系的Sun JVM是用C写的,而1.1系Sun JVM的解释器主循环是用汇编写的。 又一篇97年的老文: State of the Java SDK 引用 By re-writing the Interpreter loop of the Java VM in assembly language, 1.1 now sports a VM that runs up to five times faster on certain operations, according to JavaSoft reports. Overall speed of the VM has also increased: up to two times the speed of the 1.0.2 VM on Solaris, and a little over 1.5 times as fast on Windows 95 and NT. Better performance, along with enhanced memory management, are the most important improvements in the 1.1 release, says Arthur van Hoff, former Senior Staff Engineer at JavaSoft, author of the original Java compiler and HotJava browser, now CTO for Marimba, Inc. "It is essential for our products that the VM is fast and does not grow indefinitely. The 1.1 release is significantly faster and implements a much better garbage collector, which even cleans up classes that are no longer referenced." With Sun's acquisition of LongView Technologies in February, the bionics may just be beginning for the Java VM. See the concluding section, "Planning for the Future," for more details.
这个记录Class文件版本信息的PDF还行。 Everything you always wanted to know about Java Class Versions 不过我在1.0.2和1.1.8上试了一下,45.0-45.2都用不了,最低就是45.3,一直到45.65535都可以。 有颇详细的Java版本列表: 通信用語の基礎知識 - Java 原来现在的invokespecial指令在JDK 1.0.2之前是叫做invokenonvirtual的啊 Programming the Java Virtual Machine 引用 Old (pre JDK 1.0.2) version of invokespecial was called invokenonvirtual
Worked almost the same - but had a bug! One difference: invokespecial for a superclass with the super flag set finds the nearest superclass version of method, not necessarily the specified one All files generated by a (post-1.0.2) Java compiler should set super flag aJile Silicon Products PICOJAVA-I: THE JAVA VIRTUAL MACHINE IN HARDWARE Troubleshooting Guide for Java SE 6 with HotSpot VM Class Dump Utility 这个工具作为javap的补充还蛮不错的。 Efficient On-Stack Replacement for Aggressive Specialization of Java Programs Sun JVM各种资料链接: Sun Wiki: HotSpot Internals for OpenJDK Da Vinci Machine Project Maxine VM Revelations on Java signal handling and termination 马克一下这个问题: 请教JVM读取annotation的顺序问题 Pain point: getting the classes of a Java package Google Groups的JVM languages组,Jython作者提到获取一个package下的所有class(名)的困难,John Rose提出了一种可能的解决方案:在ClassLoader API上多加些方法 Why Java™ was - not - standardised twice |
|
RednaxelaFX
2010-08-15
马克一帖,帮翻不了建筑物的同学转过来:
Paul Done's Technical Blog: Review of the new JRockit book Paul Done 写道 As promised, here's my review of the new JRockit book...
Having used JRockit for years (mostly sitting beneath WebLogic) I've been waiting for something like this book to arrive and lift the lid off the JVM to show what's inside. I'm glad to say that I am not disappointed. This book is a must-have for any serious enterprise Java developer or administrator who uses JRockit and wants to better understand how to tune, manage and monitor the JVM. The book also provides the Java developer with a clearer direction on the do's and don't's for developing a well behaving application on top of JRockit, especially with regards to memory management and thread management. Even for users of other JVMs, like Hotspot, much of the first half of the book, which concentrates on the JVM's internals, is relevant and insightful into the workings of Java virtual machines generally. The first half of the book concentrates on providing in-depth knowledge of JRockit's internals and focusses on: * Code Generation (Java bytecode, generation of native code, JRockit 's Just In Time compilation strategy with subsequent optimised code re-generation) * Memory Management (heap usage, thread-local allocation, garbage collection strategies, deterministic-GC, 32-bit vs 64-bit memory management, potential pitfalls) * Threads and Synchronisation (green vs O.S. threads, synchronisation patterns/anti-patterns, code generation strategies for locking/unlocking, thin and fat locks, lock profiling) * Benchmarking and Tuning (throughput vs latency, tuning tips, benchmarking tips) Don't be put off by the early exposure to Java bytecode samples in the book. The bytecode examples are only used liberally and only in a couple of early chapters. It's worth reading these bytecode samples carefully because the points these chapters make will resonate more strongly if you do. As I read this book, it became evident that the JRockit engineers are extremely passionate about their work and that they live and breath it. It is re-assuring to know that they are constantly striving to improve the product, based on deep scientific theory yet always with an eye on pragmatism and real-world usage. I'm sure this is why JRockit is fast and powerful whilst reminding easy to manage and run applications on. Throughout the book, the ethos of JRockit's design is very clear. It's an adaptive JVM, where the internal runtime is constantly and automatically being re-evaluated and re-tuned, according to the current nature of the hosted application's usage and load. Reading the book, I can better appreciate the argument that server-side Java is faster than an equivalent native C application. A native application only has one-shot, at compile time, to generate optimal native code. JRockit, however, takes the opportunity to revisit this at runtime, when it has a much better idea of actual usage patterns. The second half of the book provides an introduction and detailed reference into JRockit's rich and powerful management and monitoring toolset, including: * JRockit Mission Control (JRMC), composed of the Management Console, the Flight Recorder (plus Runtime Analyzer which it replaces) and the Memory Leak Detector * JRockit Command line tool (JRCMD), including in-depth examples of all the important commands * JRockit Management APIs, including the Java API for direct in-line access to the JRockit JVM from hosted Java applications plus the JMX version of the API for remote access to the JRockit JVM These chapters provide an easy to read introduction to the key features of JRockit's rich tools, lowering the barrier to use for newbies. Also, many of the illustrated examples are use-case driven, acting as a handy reference guide to come back to at a later date. For example, if you suspect that you have a memory leak in your application and want to work out how best to locate the root of the leak, using the tools, the Leak Detector chapter will take you by the hand through this process. Finally, at the end of the book there is an introductory chapter covering JRockit Virtual Edition (VE). JRockit VE enables the JRockit JVM, accompanied by a small JRockit kernel, to be run in a virtualised environment. This runs directly on-top of a hypervisor (eg. Oracle VM) without requiring the use of a conventional, heavy-weight, general-purpose operations system such as Linux, Solaris or Windows. Such a fully functional operating systems would otherwise burden the system with a layer of unwanted latency. This chapter in particular makes me realise that the JRockit Engineers are metaphoric Rocket Scientists (or should that be Rockit Scientists? ). I defy anyone not to be impressed by the ambition of JRockit VE and and the high level of technical expertise that must have gone into developing it! To summarise, I highly recommend this book. Easy to read yet very insightful. Once you've read it, it will remain as a handy reference to come back to, especially when needing to use the JRMC tools to diagnose issues and tune the JVM and hosted applications. |
|
all_wmh
2010-08-16
书的名字是撒 没看到。。。
|
|
all_wmh
2010-08-16
好贵的书啊 $71.39
|
|
RednaxelaFX
2010-08-16
all_wmh 写道 好贵的书啊 $71.39
Oracle JRockit: The Definitive Guide 我预订电子版的时候是$31.5还是30多少的,忘了。等不及纸质书的配送 =_=||| 果然预订便宜不少,呵呵 |
|
RednaxelaFX
2010-09-02
hmm... 刚听说GreenJVM这个打包工具,貌似有趣。
IBM JDK: Diagnosis documentation IBM Garbage Collection and Storage Allocation Techniques (April 2005) Windows Java address space How to maximize the IBM Java memory address space on 32-bit Windows systems (December 2005) Compressed Oops Oracle收购了Sun之后,JDK7文档中CompressedOops的文档链接 Google Groups上Charles Nutter跟HotSpot工程师在聊一个内联启发算法的问题: Small static method marked not entrant, inlining reversed? 嗯有趣… WALA !!!!! T.J. Watson Libraries for Analysis (WALA) 这个库好猛!早点发现就好了。 引用官网上写的feature: 引用
2002年developerWorks上一篇老文,讲当时的IBM JVM的GC的,这篇提到了object layout Sensible Sanitation -- Understanding the IBM Java Garbage Collector, Part 1: Object allocation SlideShare上一个演示稿,也是讲IBM JVM的 What Your Jvm Has Been Trying To Tell You Cygwin tells you Windows java.exe default thread stack size JVM'02上的一篇论文 sEc: A Portable Interpreter Optimizing Technique for Embedded Java Virtual Machine 看起来跟之前读过的字节码压缩技术差不多 顺带几一个老的O'Reily链接 Internals of Java Class Loading 里面的图可以借鉴 John Resig的老片一部 JavaScript 1.5 to 2.0 (TomTom) SlideShare: RubyKaigi 2010 われわれは、GCをX倍遅くできる Dalvik VM & JIT Ankit Somani Lessons learned from HLVM 引用 The obvious solution of placing the header alongside the mark bit would incur false sharing when the GC thread writes to the mark bit and a mutator reads the header information.
呃,false sharing真是得时常提防着的事情 Reifying wildcards in Java using the EGO approach (2007) Maurizio Cimadamore, Mirko Viroli JVM上的语言的reified generics的一种做法 What is Gradual Typing? Design of JFluid: a profiling technology and tool based on dynamic bytecode instrumentation 2003年的技术报告。但ACM上居然下不到,还得买…搞毛啊 Object Initialization in Java: Object Initialization in the Java Language and Virtual Machine Bill Venners, 1998 minor.major version 详解 据说以前HotSpot的parallel marking是用这个算法的,mark下: Arora's Task Stealing Deque Alexander Astapchuk 大牛一只 GoLightly: Building VM-based language runtimes in Go Interview With Matz, Founder Of Ruby 27:00附近有讲到soft realtime JAnalyzer A Visual Static Analyzer for Java http://hg.openjdk.java.net/mlvm/mlvm/hotspot/ 要关注一下这个repo里的文字描述,有些有趣的idea The 292 EG has been meeting approximately weekly since JavaOne. Here is the summary of results, FYI. John Rose总结了在JavaOne 2010后JSR 292的最新动态 heap-snapshot Kelly O'Hair在dev.java.net上开的项目,想要替代HPROF个数的heap dump。还没什么内容。总之先关注一下 在JRuby的源码里看到说IBM JVM不支持-client与-server参数。有意思 Python Miro Community jdk7/hotspot-comp/hotspot: 6953144: Tiered compilation 9月份的新代码里HotSpot的tiered-compilation的Tier1仍然是C1嘛,(interpreter + C1 + C2)。没像Cliff Click之前说的会变成C2的精简版。hmm,说来也怪,实际上变成C2的精简版应该仍容易实现tiered才对。可能是C2的原始架构太死板了? Request for review (XL) 6990754: Use native memory and reference counting to implement SymbolTable HotSpot要干掉PermGen了… http://hg.openjdk.java.net/jdk7/hotspot/hotspot/rev/3582bf76420e 第一个code push已经上OpenJDK 7了,2011-01-27 Hotspot should track cumulative Java heap bytes allocated on a per-thread basis QCon 2010的Azul GC session GC Nirvana - High throughput, low latency, and lots of state, all at the same time Øredev 2010 - JVM Bytecode for Dummies Charles Nutter靠这个演讲得到了一本带作者签名的JRockit书啊 T T Henrik Ståhl: 2010-11-10 Oracle's JVM Strategy Efficient Lambda Compilation using MethodHandles and JRockit RubyConf 2010 – MacRuby talk Build your own profiling tool: Create an ideal profiler using the Java 5 agent interface and AOP チューニングのためのJavaVM講座(前編) - Hotspot VMの基本構造を理解する 嗯,虽然是04年写的,但文章的脉络组织得挺不错的。 IBM developerWorks Real-time Java, Part 2: Comparing compilation techniques Mining Opportunities for Code Improvement in a Just-In-Time Compiler IBM Research: Metronome GC JVM Tutorials - Herong's Tutorial Examples Dr. Herong Yang 写道 This free book is a collection of notes and sample codes written by the author while he was learning JVM himself. Topics include JVM (Java Virtual Machine), HotSpot, JRockit, GC (Garbage Collection), Memory, Stack overflow, CDS (Class Data Sharing), Runtime, Reflection.
HPjmeter Downloads and Documentation Introducing the HotSpot Virtual Machine for Java HP的JDK 1.3时代的文档。有趣的是它提到了.hotspotrc与.hotspot_compiler这两个配置文件。 A New Crankshaft for V8 V8也加入多层编译了,嗷! V8的新优化编译器里,SSA形式的中间代码名为Hydrogen,线性扫描寄存器分配器名为Lithium。可以看到V8的deoptimize也是依赖on-stack replacement机制的。有趣的是新架构并没有跟风使用trace-based compilation Java is a hard bootstrap Ben L. Titzer 写道 Java is a very hard language to bootstrap. It is even harder to bootstrap with "official" JDK and set of required VM features. Most of this is due to the lazy initialization and dynamic class loading model but a large part is also the poorly factored design of the JDK classes.
http://jameshamilton.eu/sites/default/files/JavaBytecodeDecompilerSurveyExtended.pdf JavaOne 2008的一个session Challenges and Directions in Java Virtual Machines 引用 There is a fundamental tension between object-oriented design
and lock-based concurrency control • OO encourages you to hide implementation details • Good OO design encourages composition But...composing thread-safe objects requiring knowing implementation details • So you can participate in other object's locking protocols • So you can avoid deadlock • Language hides these details, leaving users to rely on hidden information • If that information changes out from under you, you're sunk Optimizing invokedynamic Christian Thalinger与John Rose在2010年出的论文 Managed Runtime Initiative Azul出品的好东西,要关注 InfoQ访谈 Azul Puts the Zing in Java Artima访谈 Azul's Pauseless Garbage Collector Gil Tene 写道 > How does this compare with other "fast" garbage
> collector's such as the Jamaica RTSJ JVM? (not quite a > straight comparison as that's RTSJ rather than straight > Java but still...) They live in different application spaces. Jamaica, like several other RTSJ implementations, focuses on hard real time realtime systems (typically in the embedded world). See http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.62.5942&rep=rep1&type=pdf. I would not characterize it as a "fast" GC - instead I would characterize is as an extremely consistent GC. Jamaica identifies the universally recognized problem of heap fragmentation (there is no way to stop fragmentation from happening in contiguous Java heaps). In order to combat fragmentation without using compaction, such systems often use new heap and object layouts. In Jamaica's case, the heap is broken into fixed sized blocks [32 bytes in Jamaica's case] and Java objects larger than 32 byte end up chaining discontiguous blocks together (in either linked lists for objects, or trees for arrays). This achieves the hard real time requirement by guaranteeing no compaction will ever be needed, but it comes at a very steep memory access costs (in both memory op counts and cache misses, and in the loss of optimization opportunities and the ability to directly use common CPU addressing modes). It is exactly the right tradeoff for hard real time. Real time is not about being fast, it's about being slow but predictable. 这个对RTSJ说得极好。硬实时并不是跟“快”关联在一起的概念,只是另一种取舍而已,牺牲正常运行的性能来降低停顿时间。 http://www.youtube.com/profile?user=cbockisch#p/u Network Attached Processing の Pauseless GC Azul Technical Resources: Vega Appliance How to Stop Worrying & Start Caching in Java 这篇非常有趣,把cache好好的分了个类 非常强悍的增强版HotSwap Enhanced HotSwapping Dynamic Code Evolution VM | A modification of the Java HotSpot(TM) VM that allows unlimited class redefinition at runtime. jstack thread dump error: get_thread_regs failed for a lwp Martin Kuen 写道 java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02) Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode) ubuntu 10.04 LTS 64-bit You must invoke jstack as the user who started/is running the given process. The above error occurs if you invoke jstack as "root"/via sudo (Has Super Cow Powers but is still the wrong user) I guess you tried the "-F" option, because it didn't work without it. Therefore, you tried the sledgehammer. "-F" IS for a hung process. If you want to create a thread dump of e.g. tomcat6 (installed from ubuntu package repo) you must type the following: "sudo -u tomcat6 jstack 8812" Executes jstack as user tomcat6, who is running the service tomcat6, assuming tomcat's pid is 8812. This is not an ubuntu bug, it's - say - some sort of usability issue with this jstack thing. Blame Sun/Oracle . . . 臥槽,难怪我在Ubuntu上用jstack -m或者-F的时候总是啥也看不到,原来既需要足够权限又需要执行jstack的用户跟启动目标进程的用户是同一个。这可恶的啊… ========= Parasol Compilers Group: Hybrid Analysis and its Application to Automatic Parallelization 静态与动态分析的混合体。这个也有趣。觉得有很多能静态做的分析还是应该先静态做了之后缓存着。每次都从原始的中间代码(字节码之类)开始分析太浪费了。即便BC2HIR的过程一般包括内联动作,要是预先把有用的HIR缓存着的话就不用“转换”了啊。 ========= 几篇论文没抓到,回头要找大牛帮忙抓 On Validity of Program Transformations in the Java Memory Model (2008) http://portal.acm.org/citation.cfm?id=1428508.1428513 A Comparative Study of JVM Implementations with SPECjvm2008 http://portal.acm.org/citation.cfm?id=1797236.1798135 Compiler and runtime techniques for software transactional memory optimization http://portal.acm.org/citation.cfm?id=1464463.1464467 yeah都抓到了。 ========== HotSpot在Windows上有两种处理异常的方式,有个临时的参数来控制: UseVectoredExceptions:true的时候不使用SEH。 现在在windows_x86上是false,而在windows_ia64上是true。 |
|
RednaxelaFX
2010-12-21
Compressed Pointer/Reference相关
IBM J9版本号 引用 The Java version information can confirm that Compressed
references are in use. The "GC" Line of the version output will display "CMPRSS" after the build date, similar to: GC - 20100308_AA_CMPRSS) Object-Relative Addressing: Compressed Pointers in 64-Bit Java Virtual Machines http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.71.790 Improving 64-bit Java IPF performance by compressing heap references (2004) http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.97.8725 Understanding the Connectivity of Heap Objects (2002) http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.20.5673 Heap Compression for Memory-Constrained Java Environments (2003) http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.3091 D.: Space- and time-efficient implementation of the Java object model (2002) http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.19.2617 Bosschere. 64-bit versus 32-bit virtual machines for Java http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.164.4472 Java Performance in 64bit land 引用 The solution to this performance issue is to be smarter about the data structures. This is exactly what we did in the IBM Java6 JDK with the compressed references feature. We can play tricks (and not get caught) because the user (java programmer) doesn’t know the internal representation of the java objects.
ftp://public.dhe.ibm.com/software/webserver/appserv/was/WAS_V7_64-bit_performance.pdf 引用 Compressed references are enabled through the “–Xcompressedrefs”
command line switch in the IBM J9 for Java 6 JVM. This option is set automatically in supported 64-bit releases of WAS V7, depending on whether the maximum Java heap size is less than 25GB. While CR can address up to 28GB, the 25GB value was chosen as a safe parameter for automatic enablement across disparate platforms. Details surrounding this value have been provided in the CR technical details. To explicitly disable CR, WAS can be started using the “-Xnocompressedrefs” option. WAS V7 is supported on the majority of commercial 64-bit platforms (i.e. POWER, x86-64 from Intel/AMD, Sun SPARC, etc), however in order to use CR technology the WAS release must be packaged with the IBM J9 for Java 6 JVM. Please refer to the WAS V7 information center (4) for detailed and up-to-date software and hardware system requirements. When running 64-bit IBM J9 for Java 6 in CR mode, the JIT compiler detects the specified maximum heap size and applies appropriate compression and decompression. Namely, if the maximum heap address used by the Java JVM process is below 4GB, the shift operation on compression and decompression is avoided. Figure 2 provides a graphical representation of the address reference models used in each addressing mode. IBM J9 引用 Initial Implementation
No restriction on placement of Java heap in address space (Heap_base) Compression is subtract: (64-bit address – Heap_base) Decompression is add: (32-bit offset + Heap_base) Significant overhead on some platforms Increase in path length due to add/sub Need to handle NULL values =================================== Implementation in IBM JDK for Java6 Java heap placed in 0-4GB range of address space 32-bit offset in object is simply the address in 0-4GB range Compression (64-bit → 32-bit) : nop Decompression (32-bit → 64-bit) : zero-extension Maximum allowable heap in theory is 4GB In practice, the maximum heap available is lower ~2GB on Windows and zOS Option to enable compression in 64-bit Java JDK -Xcompressedrefs ---------------- Java objects in J9 are 8byte aligned (low 3 bits are 0) Main idea is to store 32-bit shifted offset in objects Address range restrictions relaxed Java heap allocated in 0-32GB range Compression (64-bit → 32-bit) : right shift Decompression (32-bit → 64-bit) : left shift Maximum allowable heap in theory is 32GB In practice, the maximum heap available is ~28GB Buffered dynamic run-time profiling of arbitrary data for Virtual Machines which employ interpreter and Just-In-Time (JIT) compiler 嗷嗷,J9 VM里的解释器的设计 引用 The sampler thread turns the profiler OFF or back ON
Number of consecutive ticks in JIT generated code turns the profiler OFF Number of consecutive ticks in interpreter turns the profiler back ON 这个非常合理…呃?这个设计是因为J9的profiler是跟线程而不是跟方法联系在一起的对么?跟线程联系在一起一种可能的好处是读写数据可以变成是线程局部的,就不用锁了。不过J9的profile信息是写到全局的profile hashtable的啊,为啥可以不锁 A study of Java's non-Java memory 这个有趣,以前没怎么读过特别的描述JVM中、Java堆外内存的论文。 Mostly concurrent compaction for mark-sweep GC IBM J9 V2.2里的并发GC算法 Finding low-utility data structures 基于J9的编译优化 Objects to bits: efficient implementation of object-oriented languages on very small devices ExoVM是IBM J9的特化版 The ExoVM system for automatic VM and application reduction Libra: a library operating system for a jvm in a virtualized execution environment Tax-and-spend: democratic scheduling for real-time garbage collection 嗷,讲Metronome的论文 Removing redundancy via exception check motion JBM JDK 5里J9的Testarossa JIT里的优化 Improving virtual machine performance using a cross-run profile repository JavaTM just-in-time compiler and virtual machine improvements for server and middleware applications abstract 写道 This paper describes optimization techniques recently applied to the Just-In-Time compilers that are part of the IBM® Developer Kit for JavaTM and the J9 Java virtual machine specification. It focusses primarily on those optimizations that improved server and middleware performance. Large server and middleware applications written in the Java programming language present a variety of performance challenges to virtual machines (VMs) and justin-time (JIT) compilers; we must address not only steady-state performance but also start-up time. In this paper, we describe 12 optimizations that have been implemented in IBM products because they improve the performance and scalability of these types of applications. These optimizations reduce, for example, the overhead of synchronization, object allocation, and some commonly used Java class library calls. We also describe techniques to address server start-up time, such as recompilation strategies. The experimental results show that the optimizations we discuss in this paper improve the performance of applications such as SPECjbb2000 and SPECjAppServer2002 by as much as 10-15%.
IBM 64-bit SDK for z/OS, Java Technology Edition Version 6 Release 0 Modification 1 lets application developers use Java on IBM z/OS 引用 64-bit SDK for z/OS, Java Technology Edition Version 6 Release 0 Modification 1 is a Java SDK that contains a reengineered Java virtual machine at the SDK 6 level and the IBM Just-In-Time (JIT) compiler. The program is a key building block for developing on-demand applications. 64-bit SDK for z/OS, Java Technology Edition Version 6 Release 0 Modification 1 is compliant with the Java SDK 6 compatibility test and is designed to provide the stability, service, scalability, and integration you expect from a System z program.
64-bit SDK for z/OS, Java Technology Edition Version 6 Release 0 Modification 1 is designed to provide: Support for Java application programming in a 64-bit application environment Java APIs at the SDK 6 level Continuation of the "write once, run anywhere" Java paradigm JZOS support and enhancements Exploitation of z196 instructions Added z/OS Java unique security functions XML support System Authorization Facility (SAF) and cryptography support Use of your System z Application Assist Processors (zAAPs) available on z196, z10 EC, z10 BC, z9 EC, z9 BC, z990, and z890 servers to run eligible Java work Additional reliability, availability, and serviceability (RAS) enhancements z/OS Java unique security The following z/OS security and cryptography enhancements have been added to 64-bit SDK for z/OS, Java Technology Edition Version 6 Release 0 Modification 1: Support is added for AES Secure Keys in the IBMJCECCA hardware crypto provider. This capability requires z/OS V1.11 and ICSF HCR7751. Enhanced ICSF exception handling is added in the IBMJCECCA hardware crypto provider, helping to simplify and streamline problem determination. JZOS functions The following JZOS enhancements are added to 64-bit SDK for z/OS, Java Technology Edition Version 6 Release 0 Modification 1 to help to: Enable the submission of jobs to the MVS™ internal reader and retrieval of the submitted JOB ID. Text, record, and binary JCL will be supported. The MVS internal reader attributes LRECL, RECFM, and Class will be configurable from this Java class. Enhance the Zlogstream class to support IXGBRWSE (read) and IXGDELT (delete) and add InputStream/OutputStream Java wrappers. Support Extended Address Volumes (EAV). Add a new package -- com.ibm.jzos.wlm -- with selected z/OS Workload Manager (WLM) APIs. These JZOS functions have been previously available from the IBM alphaWorks® website, and are now integrated into the IBM z/OS Java SDK. For reference, the IBM alphaWorks website is located at http://www.alphaworks.ibm.com/tech/zosjavabatchtk RAS 64-bit SDK for z/OS, Java Technology Edition Version 6 Release 0 Modification 1 includes similar dump capability, tracing, and problem determination as in SDK for z/OS, Java Technology Edition Version 6 Release 0 Modification 0. Section 508 of the US Rehabilitation Act 64-bit SDK for z/OS, Java Technology Edition Version 6 Release 0 Modification 1 is capable as of March 15, 2011, when used in accordance with IBM's associated documentation, of satisfying the applicable requirements of Section 508 of the Rehabilitation Act, provided that any assistive technology used with the product properly interoperates with it. A US Section 508 Voluntary Product Accessibility Template (VPAT) can be requested on the following website http://www-03.ibm.com/able/product_accessibility/index.html InfoQ: IBM Releases New 64-bit Java SDK for z/OS J9 VM 2.6系的新发布 http://gotocon.com/dl/jaoo-aarhus-2010/slides/DaveThomas_CareerYouBuildTheCareerYouWant.pdf Dave Thomas 写道 14. Formed OTI, an embedded Smalltalk company Digitalk 32-
bit Smalltalk, Embedded Smalltalk for Tektronix, Just in Time Software, ENVY/Developer, Actra, HP NA, Momenta Pen computer, Sony Qualcomm phone, Siemens PBX, IBM Smalltalk and VisualAge K8 VM 15. Enter Java...sold OTI to IBM, built VisualAge Java (UVM) and Eclipse, IBM Pervasive Computing J9 VM |
相关讨论
相关资源推荐
- 使用Process Explorer/Process Hacker和Windbg初步定位软件高CPU占用问题
- Maven / Svn / Git 系列课程专题
- 在VScode中搭建C/C++编译环境
- 注册https://github.com/账号
- mipi接口 1280(RGB)*720 LCD屏开发驱动笔记帖
- gcc和makefile用法总结(建议收藏)
- 【万人千题】结对编程排位赛(第一期) 第一周 排名公布,这也太卷了
- 程序 = 数据结构 + 算法《禅与计算机程序设计艺术》 / 陈光剑
- 计算简史:什么是计算机?《禅与计算机程序设计艺术》 / 陈光剑
- 概率统计极简入门:通俗理解微积分/期望方差/正态分布前世今生(23修订版)