{"id":185010,"date":"2013-06-28T18:46:03","date_gmt":"2013-06-28T14:46:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=185010"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=185010","title":{"rendered":"<span class=\"post_title\">\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0444\u0430\u0439\u043b\u0435\u0440 \u0441\u0432\u043e\u0438\u043c\u0438 \u0440\u0443\u043a\u0430\u043c\u0438<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u0414\u0430\u0432\u043d\u043e \u0445\u043e\u0442\u0435\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u0430 \u0431\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0432 \u043a\u0430\u043a\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u0430\u0445 \u043a\u043e\u0434 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u043a\u0430\u043a\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0438 \u0432 \u043a\u0430\u043a\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0443 \u043f\u043e\u0441\u0435\u0449\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u0430 \u043d\u0435 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a.<\/p>\n<p>  \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u2014 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0430, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u0438 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0442 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b.<\/p>\n<p>  <a name=\"habracut\"><\/a><br \/>  \u0412 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 java \u043c\u0430\u0448\u0438\u043d \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 <a href=\"http:\/\/docs.oracle.com\/javase\/7\/docs\/platform\/jvmti\/jvmti.html\">Java Virtual Machine Tool Interface (JVM TI)<\/a>.<br \/>  \u041d\u043e \u044d\u0442\u043e\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 native \u043c\u043e\u0434\u0443\u043b\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0441\u044f.<\/p>\n<p>  \u041e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f (intstrumentation) \u0431\u0430\u0439\u0442\u043a\u043e\u0434\u0430. <br \/>  \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043f\u0430\u043a\u0435\u0442 java.lang.instrument \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u043c\u0435\u0448\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0431\u0430\u0439\u0442\u043a\u043e\u0434\u0430 \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0435\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0430 \u043b\u0435\u0442\u0443.<\/p>\n<p>  \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u044d\u0442\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<br \/>  \u041f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 java \u043c\u0430\u0448\u0438\u043d\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u043b\u044e\u0447 -javaagent:jar-file-name=parameters, <br \/>  \u0433\u0434\u0435 jar-file-name \u2014 \u044d\u0442\u043e \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u043a jar \u0444\u0430\u0439\u043b\u0443 \u0430\u0433\u0435\u043d\u0442\u0430, parameters \u2014 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0435 \u0430\u0433\u0435\u043d\u0442\u0443. <\/p>\n<p>  \u0412 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0435 jar \u0444\u0430\u0439\u043b\u0430 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043c\u0435\u0442\u043e\u0434  <\/p>\n<pre><code class=\"java\">public static void premain(String args, Instrumentation instrumentation) <\/code><\/pre>\n<p>  \u043a\u043e\u0442\u043e\u0440\u044b\u0439 jvm \u0438 \u0432\u044b\u0437\u043e\u0432\u0435\u0442 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0430\u0433\u0435\u043d\u0442\u0430. <br \/>  \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043f\u0440\u043e \u044d\u0442\u043e\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"http:\/\/nkoksharov.blogspot.ru\/2008\/11\/javaagent.html\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p>  \u0417\u0430\u0434\u0430\u0447\u0430 \u043d\u0430\u0448\u0435\u0433\u043e \u0430\u0433\u0435\u043d\u0442\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c,<br \/>  \u0447\u0442\u043e \u0431\u044b \u043f\u0440\u0438 \u0432\u0445\u043e\u0434\u0435 \u0438 \u0432\u044b\u0445\u043e\u0434\u0435 \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u043c\u0435\u0442\u043e\u0434\u044b \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 <a href=\"https:\/\/github.com\/scanban\/traceragent\/blob\/master\/src\/main\/java\/agent\/TracerAgent.java\">TracerAgent<\/a>:  <\/p>\n<pre><code class=\"java\">    @SuppressWarnings(&quot;unused&quot;)     public static void methodEnter(MethodInfo methodInfo) {         methodCallProcessor.methodEnter(methodInfo);     }     @SuppressWarnings(&quot;unused&quot;)     public static void methodExit() {         methodCallProcessor.methodExit();     } <\/code><\/pre>\n<p>  \u042d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u043b\u0430\u0441\u0441\u0430 <a href=\"https:\/\/github.com\/scanban\/traceragent\/blob\/master\/src\/main\/java\/agent\/MethodInfo.java\">MethodInfo<\/a> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043c\u0435\u0442\u043e\u0434\u0435.<br \/>  \u041d\u0443\u0436\u043d\u043e \u0433\u0434\u0435 \u0442\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c MethodInfo \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430.<br \/>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f shadow \u043a\u043b\u0430\u0441\u0441 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0432\u0438\u0434\u0430:  <\/p>\n<pre><code class=\"java\">public class ShadowClassXXX { \tpublic static  MethodInfo m1 = agent.TracerAgent.getMethodInfo(1L); \/\/ MethodInfo \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \t\/* .. *\/ \tpublic static  MethodInfo m99 = agent.TracerAgent.getMethodInfo(99L); \/\/ MethodInfo \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 } <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u043e\u043b\u044f shadow \u043a\u043b\u0430\u0441\u0441\u0430 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435, \u043e\u043d\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435. \u0412 \u043d\u0430\u0447\u0430\u043b\u043e \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u0434:  <\/p>\n<pre><code class=\"java\">TracerAgent.methodEnter(ShadowClass.mXXX); <\/code><\/pre>\n<p>  \u0432 \u043a\u043e\u043d\u0435\u0446  <\/p>\n<pre><code class=\"java\">TracerAgent.methodExit(); <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u0430\u0439\u0442\u043a\u043e\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 <a href=\"http:\/\/www.jboss.org\/javassist\">Javassist<\/a>. \u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0435 \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u0430\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0431\u0430\u0439\u0442\u043a\u043e\u0434\u0435, \u0430 \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0439 \u043d\u0430 java.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438 \u0432\u0445\u043e\u0434\u0435 \u0438 \u0432\u044b\u0445\u043e\u0434\u0435 \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 <br \/>  \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043c\u0435\u0442\u043e\u0434\u0430\u043c \u043a\u043b\u0430\u0441\u0441\u0430 MethodCallProcessor.<\/p>\n<p>  <a href=\"https:\/\/github.com\/scanban\/traceragent\/blob\/master\/src\/main\/java\/agent\/MethodCallProcessor.java\">MethodCallProcessor<\/a> \u0445\u0440\u0430\u043d\u0438\u0442 \u0441\u0442\u044d\u043a \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f ThreadLocal.<br \/>  methodEnter \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0432 \u0441\u0442\u044d\u043a <a href=\"https:\/\/github.com\/scanban\/traceragent\/blob\/master\/src\/main\/java\/agent\/MethodCallMarker.java\">MethodCallMarker<\/a> \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0432\u044b\u0437\u043e\u0432\u0430 \u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0432\u044b\u0437\u043e\u0432\u043e\u0432.<br \/>  \u0415\u0441\u043b\u0438 \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0442\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u0442\u044d\u043a \u0432\u044b\u0437\u043e\u0432\u043e\u0432.<br \/>  methodExit \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u0438\u0437 \u0441\u0442\u044d\u043a\u0430 MethodCallMarker, \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0435 \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 \u043a \u0435\u0433\u043e MethodInfo.<\/p>\n<p>  \u0412 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 <a href=\"https:\/\/github.com\/scanban\/traceragent\/blob\/master\/src\/main\/java\/agent\/TracerAgent.java\">TracerAgent<\/a> \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f Thread \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 shutdownhook. \u042d\u0442\u043e\u0442 Thread \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043f\u0440\u0438 shutdown sequence jvm \u0438 \u0440\u0430\u0441\u043f\u0435\u0447\u0430\u0442\u0430\u0435\u0442 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443. \u0422\u0430\u043c \u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f Thread \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0432\u044b\u0432\u043e\u0434\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438.  <\/p>\n<pre> \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b: -javaagent:&lt;\u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u043a jar-\u0444\u0430\u0439\u043b\u0443 \u0430\u0433\u0435\u043d\u0442\u0430&gt;=p:regexp[#t:regexp][#d:number][#i:number] p - \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b (\u043f\u043e\u043b\u043d\u043e\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435 - match) t - \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b (\u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435 - find) d - \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043e\u0442\u043b\u0430\u0434\u043a\u0438  i - \u043f\u0435\u0440\u0438\u043e\u0434 \u0432\u044b\u0432\u043e\u0434\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445 (0 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0432\u044b\u0432\u043e\u0434) <\/pre>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0434\u043b\u044f \u043a\u043e\u0434\u0430 \u0438\u0437 <a href=\"http:\/\/habrahabr.ru\/post\/182788\/\">\u0441\u0442\u0430\u0442\u044c\u0438<\/a>:  <\/p>\n<pre><code class=\"bash\">java -version java version &quot;1.7.0_21&quot; Java(TM) SE Runtime Environment (build 1.7.0_21-b11) Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)  java -XX:-UseSplitVerifier -javaagent:D:\\traceragent\\target\\traceragent-1.0-SNAPSHOT-complete.jar=p:examples.*#d:1#i:5 <\/code><\/pre>\n<p>  javassist \u0435\u0449\u0435 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043d\u043e\u0432\u044b\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c \u0431\u0430\u0439\u0442\u043a\u043e\u0434\u0430 \u043a\u043b\u0430\u0441\u0441\u0444\u0430\u0439\u043b\u043e\u0432 \u0432\u0435\u0440\u0441\u0438\u0438 51. <br \/>  \u043a\u043b\u044e\u0447 <b>-XX:-UseSplitVerifier<\/b> \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u0432\u0435\u0440\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0431\u0430\u0439\u0442\u043a\u043e\u0434\u0430, \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0432 JVM7, <a href=\"http:\/\/chrononsystems.com\/blog\/java-7-design-flaw-leads-to-huge-backward-step-for-the-jvm.\">\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438<\/a>.   <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre> [AGENT+] *** performance report ***  Top 5 time consuming methods (microseconds):           965050  examples.data.CashAccountRow$masks.access$100(examples.data.CashAccountRow$masks)           779944  examples.data.CashAccountRow.setAge(int)           766023  examples.data.CashAccountRow.setGender(int)           764292  examples.data.CashAccountRow.setHeight(int)           763387  examples.data.CashAccountRow.setAmount(int)  Top 5 called methods:         22805261 examples.data.CashAccountRow$masks.access$100(examples.data.CashAccountRow$masks)          9122242 examples.data.CashAccountRow$shifts.access$000(examples.data.CashAccountRow$shifts)          2280592 examples.data.CashAccountRow.setAge(int)          2280623 examples.data.CashAccountRow.setBitStorage(long)          2280653 examples.data.CashAccountRow.setGender(int)  Top 5 objects constructed:                1 examples.data.CashAccountStore                1 examples.data.CashAccountRow  [AGENT-] *** end of performance report ***  --- skip ---  Number of records matched:38 Elapsed time:7707ms Used Memory:91MB  [AGENT+] *** performance report ***  Top 10 time consuming methods (microseconds):         36081913  examples.App.main(java.lang.String[])         20606259  examples.data.CashAccountStore()         15428502  examples.data.CashAccountStore.find2(examples.data.CashAccountStore$CashAccountFinder)         12439241  examples.data.GenMatcherAMOUNTHEIGHTGENDER.c(examples.data.CashAccountRow)          9469502  examples.data.CashAccountRow.getAmount()          5928018  examples.data.CashAccountRow$masks.access$100(examples.data.CashAccountRow$masks)          3392146  examples.data.CashAccountRow$shifts.access$000(examples.data.CashAccountRow$shifts)          3279163  examples.data.CashAccountRow.setAge(int)          3271959  examples.data.CashAccountRow.setHeight(int)          3267890  examples.data.CashAccountRow.setAmount(int)  Top 10 called methods:        140079808 examples.data.CashAccountRow$masks.access$100(examples.data.CashAccountRow$masks)         80079812 examples.data.CashAccountRow$shifts.access$000(examples.data.CashAccountRow$shifts)         40000000 examples.data.CashAccountRow.getAmount()         30000000 examples.data.CashAccountRow.setBitStorage(long)         20000000 examples.data.GenMatcherAMOUNTHEIGHTGENDER.c(examples.data.CashAccountRow)         10000000 examples.data.CashAccountRow.setGender(int)         10000000 examples.data.CashAccountRow.setAge(int)         10000000 examples.data.CashAccountRow.setAmount(int)         10000000 examples.data.CashAccountRow.setHeight(int)         10000000 examples.data.CashAccountRow.getBitStorage()  Top 10 objects constructed:                3 examples.data.CashAccountStore$CashAccountFinder$FieldGetter                3 examples.data.CashAccountStore$CashAccountFinder$PredicateHolder                3 examples.data.CashAccountRow                1 examples.data.GenMatcherAMOUNTHEIGHTGENDER                1 examples.data.GenMatcherBase                1 examples.data.CashAccountStore$CashAccountFinder$HeightFieldGetter                1 examples.data.CashAccountStore$CashAccountFinder                1 examples.data.CashAccountStore                1 examples.data.CashAccountStore$CashAccountFinder$AmountFieldGetter                1 examples.data.CashAccountStore$CashAccountFinder$GenderFieldGetter  [AGENT-] *** end of performance report *** <\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0430\u0433\u0435\u043d\u0442\u0430 \u043d\u0435 \u043c\u043e\u0433 \u043d\u0435 \u0441\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0431\u044b\u0441\u0442\u0440\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438. <br \/>  \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u043e\u0441\u044c \u043f\u043e\u0447\u0442\u0438 \u0432 500 \u0440\u0430\u0437. <br \/>  H\u043e \u044d\u0442\u043e \u044d\u043a\u0441\u0442\u0440\u0435\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043b\u0443\u0447\u0430\u0439, \u0433\u0434\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u044b \u0441 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0443\u0441\u0442\u044b\u043c \u0442\u0435\u043b\u043e\u043c, \u0432 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0436\u0438\u0437\u043d\u0438 \u0441 \u043e\u0432\u0435\u0440\u0445\u0435\u0434\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043c\u0438\u0440\u0438\u0442\u044c\u0441\u044f.<\/p>\n<p>  \u0426\u0435\u043b\u044c\u044e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435 \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0447\u043d\u044b\u0439 \u043f\u0440\u043e\u0444\u0430\u0439\u043b\u0438\u043d\u0433 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0447\u043d\u043e\u0435 \u043a\u043e\u043b-\u0432\u043e \u0432\u044b\u0437\u043e\u0432\u043e\u0432, <br \/>  \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438. \u041a\u043e\u0434 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043d\u0430 <a href=\"https:\/\/github.com\/scanban\/traceragent\">GitHub<\/a>.<\/p>\n<p>  <b>PS.<\/b> \u041d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0439\u0441\u044f \u043a\u043e\u0434 \u043a\u0430\u043a \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0444\u0430\u0439\u043b\u0435\u0440 \u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f. \u042d\u0442\u043e \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442, \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0440\u0430\u0431\u043e\u0442\u044b JVM.      \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/185010\/\"> http:\/\/habrahabr.ru\/post\/185010\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u0414\u0430\u0432\u043d\u043e \u0445\u043e\u0442\u0435\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u0430 \u0431\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0432 \u043a\u0430\u043a\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u0430\u0445 \u043a\u043e\u0434 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u043a\u0430\u043a\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0438 \u0432 \u043a\u0430\u043a\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0443 \u043f\u043e\u0441\u0435\u0449\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u0430 \u043d\u0435 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a.<\/p>\n<p>  \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u2014 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0430, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u0438 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0442 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-185010","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/185010","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=185010"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/185010\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=185010"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=185010"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=185010"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}