Discover lightweight java profiler, include the articles, news, trends, analysis and practical advice about lightweight java profiler on alibabacloud.com
Recently, some friends talked about system performance analysis. The best way to analyze why a Java-based system is slow is to use profiler.
The principle of profiler is to use some drivers and JVM bindings to read the JVM runtime and get the time from loading the class to the execution to the end of the entire process, so as to know the methods of those function
As you know, the multithreading security of Java is implemented based on the lock mechanism, and the performance of lock is often unsatisfactory.The reason is that Monitorenter and Monitorexit, the two bytecode primitives that control multithreading synchronization, are implemented by the JVM relying on operating system mutexes (mutexes).A mutex is a resource-intensive operation that causes a thread to hang and, in a short time, needs to be re-dispatc
In the process of dealing with some of the more progressive junior programmers, we summed up some of the experience to help qualified programmers as soon as possible, in general, more learning, more practice does not suffer. This article comes from an excerpt from the Java Web Lightweight Development Interview tutorial.1 which knowledge points can be postponed to understandIn the
Java EE is divided into:
Lightweight Java EE
Spring, hibernate as the core, without application server support, as long as it works well on a Web server such as Tomcat, jetty, etc.
Classic Java EE
With EJB3 as the core, need EJB container support , need to run in JBoss, WebLogic, WebSpher
its last 2bit is the lock status flag bit, which marks the state of the current object, the state of the object, and determines what the Markword stores, as shown in the following table:
Status
flag Bit
Store Content
Not locked
01
Object hash code, object generational age
Lightweight locking
00
Pointer to lock record
Expansion (heavy-lock)
10
comparison of these types of locks:
Lock
Advantages
Disadvantages
Applicable scenarios
Biased lock
Locking and unlocking does not require additional consumption, and the execution of a non-synchronous method is less than the nanosecond-level gap.
If there is a lock contention between threads, additional lock revocation consumption is brought.
Applies to only one thread to access the synchronization block scenario.
Some days ago, I wrote an article in the blog Park, how to introduce my project experience in the interview, Harvest more than 2000 clicks, which undoubtedly inspired me to continue to share the enthusiasm, today I come to share another interview can even help everyone to reverse the skills, this article is from the Java Web Lightweight Development Interview tutorial from the excerpt.-----------------------
Last week wrote an article, database aspects of interview skills, how to display their ability from the table, courtesy of the administrator to lift, put in the home, but also thanks to you love, two days in the harvest of nearly 770 clicks, also once entered the 48-hour hot list.In order to thank the Administrator and everyone for their support, and then based on my interview experience, an original article on how the index to promote their own articles. It's also from the book I wrote.Java Web
;set_safepoint_visible (TRUE);
Threadservice::add_thread (P, daemon);
//Possible GC point.
Events::log (P, "Thread added:" Intptr_format, p);
}
(2) After the thread executes, it will clean itself out of the thread list (source location: Threads::remove (this)); So just determine if thread 1 is present in the thread list and judge the source code (located atbiasedLocking.cpp) are as follow
This article comes from an excerpt from the Java Web Lightweight Development Interview tutorial.The English meaning of inverse is inversion, which is used in hibernate to decide which party is to maintain the association between the two business entity classes, specifically, which side is going to set the field value of the FOREIGN KEY constraint.Its default value is False, that is, this side (such as Inver
Spring is an open source framework, and spring is a lightweight Java development framework that emerged in 2003 by Rod Johnson in his book expert one-on-one development and Some of the concepts and prototypes elaborated in design are derived. It is created to address the complexities of enterprise application development. One of the main advantages of the framework is its layered architecture, which allows
The focus of the lightweight framework and the heavyweight framework on problem solving is different.A lightweight frameworkThe lightweight framework focuses on reducing the complexity of development, and its processing power is diminished (such as a weak transaction, no distributed processing power), and is more suitable for developing small and medium business
Source: http://www.cnblogs.com/whitewolf/p/4185908.htmlGuice is an absolutely lightweight Java IOC container developed by Google Daniel Bob Lee. The advantage is:
Faster, claiming to be 100 times times faster than spring.
No external configuration (such as the need to use external can choose Guice Extension package), completely based on the annotation feature, support refactoring, code static c
The lightweight component first appears in the AWT1.1 version. AWT initially includes only the weight components associated with the local peer component, which are drawn in their own local opaque windows. In contrast, swing components are almost always lightweight components, with no local peers compared to weight components, unlike weight components that are drawn in their own local opaque forms, and
First, lightweight and heavyweight are relative concepts, mainly for the ease of use of the application framework and the service features provided.For example, EJB is a heavyweight framework, because itCodeIt also provides distributed and other complex functions.In contrast, spring is a lightweight framework, because it only requires common Java objects, and it
Java Object Header and monitorJava object headers are the basis for implementing synchronized lock objects, and the lock objects used by synchronized are stored in the Java object header.The object header contains two parts: Mark Word and Class Metadata AddressWhere Mark Word stores the object's hashcode, generational age, lock tag bit, and so on by default the following is the mark Word default storage str
The focus of the lightweight framework and the heavyweight framework on problem solving is different.A lightweight frameworkThe lightweight framework focuses on reducing the complexity of development, and its processing power is diminished (such as a weak transaction, no distributed processing power), and is more suitable for developing small and medium business
relationships to achieve cascading saving7 customer.getorders (). Add (order);8 //the order object must be associated with the customer object for inverse to work9 Order.setcustomer (customer);Ten One ATransaction trans =session.begintransaction (); - Session.save (customer); - trans.commit (); the hibernateutils.closesession (); - - } -}In the preceding code, the statement "Order.setcustomer (Customer)" is used to implement the Association of order to the Customer object, and hi
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.