harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Rebriy (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-4555) [drlvm][thread][perf]Thread.currentThread() works slowly
Date Tue, 05 Feb 2008 12:02:18 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-4555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12565714#action_12565714
] 

Pavel Rebriy commented on HARMONY-4555:
---------------------------------------

Created patch failed during compile parsing:

$ java CurrentThreadTest
UNKNOWN ptr:int8
Assertion failed: 0, file d:\1work\git-master\vm\jitrino\src\translator\java\JavaLabelPrepass.h,
line 293

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

The crash stack is the following:

 	msvcr71d.dll!_assert(const char * expr=0x024c8c98, const char * filename=0x024e8ef8, unsigned
int lineno=0x00000125)  Line 295	C
>	jitrino.dll!Jitrino::JavaLabelPrepass::getJavaType(Jitrino::Type * type=0x032bd59c) 
Line 293 + 0x1b bytes	C++
 	jitrino.dll!Jitrino::JavaByteCodeTranslator::checkStack()  Line 359 + 0xe bytes	C++
 	jitrino.dll!Jitrino::JavaByteCodeTranslator::offset(unsigned int offset=0x0000001e)  Line
424	C++
 	jitrino.dll!Jitrino::JavaByteCodeParserCallback::parseByteCode(const unsigned char * byteCodes=0x02ea4790,
unsigned int off=0x0000001e)  Line 353 + 0x11 bytes	C++
 	jitrino.dll!Jitrino::ByteCodeParser::parse(Jitrino::ByteCodeParserCallback * cb=0x0393e920)
 Line 70 + 0x1a bytes	C++
 	jitrino.dll!Jitrino::JavaTranslator::translateMethod(Jitrino::CompilationInterface &
ci={...}, Jitrino::MethodDesc & methodDesc={...}, Jitrino::IRBuilder & irBuilder={...})
 Line 56	C++
 	jitrino.dll!Jitrino::TranslatorSession::translate()  Line 73 + 0x16 bytes	C++
 	jitrino.dll!Jitrino::TranslatorSession::run()  Line 56	C++
 	jitrino.dll!Jitrino::Inliner::runTranslatorSession(Jitrino::CompilationContext & inlineCC={...})
 Line 879 + 0xd bytes	C++
 	jitrino.dll!Jitrino::Inliner::createInlineNode(Jitrino::CompilationContext & inlineCC={...},
Jitrino::MethodCallInst * call=0x032bd630)  Line 966	C++
 	jitrino.dll!Jitrino::Inliner::runInliner(Jitrino::MethodCallInst * call=0x032bd630)  Line
1141 + 0x10 bytes	C++
 	jitrino.dll!Jitrino::Inliner::processInlinePragmas(Jitrino::IRManager & irm={...}) 
Line 1239	C++
 	jitrino.dll!Jitrino::FlowGraph::doTranslatorCleanupPhase(Jitrino::IRManager & irm={...})
 Line 1179 + 0x9 bytes	C++
 	jitrino.dll!Jitrino::TranslatorSession::postTranslatorCleanup()  Line 85 + 0x9 bytes	C++
 	jitrino.dll!Jitrino::TranslatorSession::run()  Line 57	C++
 	jitrino.dll!Jitrino::runPipeline(Jitrino::CompilationContext * c=0x0393f110)  Line 224 +
0xd bytes	C++
 	jitrino.dll!Jitrino::compileMethod(Jitrino::CompilationContext * cc=0x0393f110)  Line 241
+ 0x9 bytes	C++
 	jitrino.dll!Jitrino::Jitrino::CompileMethod(Jitrino::CompilationContext * cc=0x0393f110)
 Line 258 + 0x9 bytes	C++
 	jitrino.dll!JIT_compile_method_with_params(void * jit=0x00498068, void * compilation=0x0393f450,
Method * method_handle=0x02e48cb8, OpenMethodExecutionParams compilation_params={...})  Line
260 + 0xc bytes	C++
 	harmonyvm.dll!Dll_JIT::compile_method_with_params(void * compilation=0x0393f450, Method
* method=0x02e48cb8, OpenMethodExecutionParams flags={...})  Line 62 + 0x18 bytes	C++
 	harmonyvm.dll!compile_do_compilation_jit(Method * method=0x02e48cb8, JIT * jit=0x00498068)
 Line 656 + 0x19 bytes	C++
 	harmonyvm.dll!vm_compile_method(void * jit=0x00498068, Method * method=0x02e48cb8)  Line
2632 + 0xd bytes	C++
 	em.dll!DrlEMImpl::methodProfileIsReady(MethodProfile * mp=0x02e4ad20)  Line 792 + 0x16 bytes
C++
 	em.dll!EBProfileCollector::onTimeout()  Line 189 + 0x17 bytes	C++
 	em.dll!DrlEMImpl::tbsTimeout()  Line 837 + 0xd bytes	C++
 	em.dll!ProfilerThreadTimeout()  Line 55 + 0x15 bytes	C++
 	harmonyvm.dll!Java_java_lang_EMThreadSupport_onTimeout(JNIEnv_External * jenv=0x032050b8,
_jobject * cls=0x0393f804)  Line 49 + 0x10 bytes	C++
 	028cf7c2()

It seems to be a VMMagic's problem in JIT.


> [drlvm][thread][perf]Thread.currentThread() works slowly
> --------------------------------------------------------
>
>                 Key: HARMONY-4555
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4555
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Vladimir Strigun
>         Attachments: Thread.currentThread-VMMagic-workaround.patch, Thread.currentThread-VMMagic.patch
>
>
> The test below shows that Thread.currentThread() method significantly slower in comparison
win Sun. 
> I believe implementation of method through vmmagic could singnificanlty improve the situation.
> Results of test execution:
> java client: 200 msec
> java server: 20 
> harmony server: 5800 msec
> Small test:
> public class CurrentThreadTest {
>     public static void main(String[] args) {
>         long st = System.currentTimeMillis();
>         for(int i=0; i< 100000000; i++) {
>             Thread.currentThread();
>         }
>         long res = System.currentTimeMillis()-st;
>         System.out.println("res="+res);
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message