Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8314305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T20:46:23+00:00 2026-06-08T20:46:23+00:00

I am not talking about time to take to enter synchronize block. I am

  • 0

I am not talking about time to take to enter synchronize block.
I am talking about time to take to execute MonitorEnter and MonitorExit statement.
And, how can I measure time to take to execute statement in C(JNI)?
I am developing Android app using Eclipse and OSX.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T20:46:25+00:00Added an answer on June 8, 2026 at 8:46 pm

    When dealing with an uncontested lock, the current version of Dalvik uses a fast path that avoids heavyweight thread synchronization operations. In terms of speed, it’s probably about the same as calling a short CPU-bound method written in the Java programming language.

    If the lock is contested (that is, two or more threads are interacting with it), then this ends up being a much heavier-weight operation, bottoming out of the VM as calls to the underlying OS’s thread library. That said, it’s typical to expect the time spent doing heavyweight thread operations to be dominated by the actual activity being locked (because if the activity weren’t relatively long-running, you wouldn’t have been so likely to have a contested lock in the first place).

    As always, profiling can help you figure this all out.

    If you want to peek under the covers, you can find the salient code in platform/dalvik/vm/Sync.cpp> in the Android sources. Look for dvmLockObject, though you’ll have to wander into the JIT compiler code to get a more complete story.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not talking about Linq to SQL. Just Linq to DataSet. Let's say I
I'm not talking about making portable code. This is more a question of distribution.
I'm not talking about a UIWebView , I want to open the mobile safari
First, I am not talking about the new 'dynamic' keyword n C# 4.0. :)
Is it possible to change the size of an UITabBarItem? I'm not talking about
What are some situations where languages should be mixed? I'm not talking about using
First of all, I want to be clear that I'm not talking about defining
Please help me with my understanding. Also I am not talking about SSL or
How do I compare 2 functions in javascript? I am not talking about internal
Where does the WTP Eclipse plugin write it's error log? I'm not talking about

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.