Profiler API - Locks, Threading.Monitor.Enter and Exit

I'm using the Profiler API in a project in order to track the locks made using Monitor.Enter, Monitor.Exit, and the lock keyword. I planned to do this by outputting using a pipe, the events from the FunctionEnter3WithInfo and FunctionLeave3WithInfo callbacks.
These callbacks are called when methods are entered and exited, and appear to be functioning fine regarding their implementation - they generate a large output of methods that had been entered and left, but I'm not receiving callbacks for the following:
ENTER: Monitor.Exit
LEAVE: Monitor.Enter and Monitor.Exit
Oddly enough, I do get receive a callback for entering Monitor.Enter. Other than these problematic methods, I appear to be getting calls from the Profiler API for everything else. 
Is there a known issue regarding these methods not being reported by the API? 
Alternatively, if there's a better way of achieving my goal than the way I'm doing it, feel free to point me in the right direction :)
Thanks,
Olu

Thanks for the reply Brian,
I don't get a JITInlining callback for Monitor.Exit (however I do for some Monitor.Enter calls). For FunctionTailcall3WithInfo, I also don't get a callback for Monitor.Exit (but I do for some Monitor.Enter calls).
I'm not getting anything from ExceptionUnwindFunctionEnter, though when manually tested by throwing an exception within a try-catch, I get a callback.
If it helps, I have the following flags set for events:
COR_PRF_MONITOR_ALL
COR_PRF_ENABLE_FUNCTION_ARGS
COR_PRF_ENABLE_FUNCTION_RETVAL
COR_PRF_ENABLE_FRAME_INFO
Additionally, I've tried the following flags to see if it resolves the issue:
COR_PRF_DISABLE_INLINING
COR_PRF_DISABLE_OPTIMIZATIONS
Edit 1: Using COR_PRF_DISABLE_OPTIMIZATIONS now means I get a callback to FunctionLeave3WithInfo when Monitor.Enter leaves, however there is still no sign of Monitor.Exit
Edit 2: As a test, in the small application that I'm profiling, I've wrapped the Monitor.Exit and Monitor.Enter method calls in another class, so I can call them as so:
CCMonitor.Enter(obj) and CCMonitor.Exit(obj).
The profiler reports both the enter and leave of these functions correctly.
Thanks,
Olu

Similar Messages

  • Using addEventListener for Enter and Exit frame

    hi , sometimes i want to set some function in specific frame in start and exit this frame
    for example i have Flv player in frame 20 , i have background sound ( mp3 player ) so i want when swf goes to this frame my sound goes Off and when Exit from it and go to another frames the sound played again ...
    i put these script in frame 20 :
    addEventListener(Event.ENTER_FRAME,enterfunc);
    function enterfunc(e:Event):void {
        trace("I started");
    addEventListener(Event.EXIT_FRAME,exitfunc);
    function exitfunc(e:Event):void {
        trace("will Exit");
    but after test movie i see I started and will Exit runs Repeatly without stoping !!
    Notice : first i put my sndChannel = soundClip.play; and sndChannel = soundClip.stop;  but my music runs over and over and finally my system Hanged and need to Restart so i use trace to see
    so whats a problem ?  thanks for spending time and help me

    kglad wrote:
    // in frame 1:
    function f():void{
    trace("function f is executing when the playhead is in frame:", this.currentFrame);
    // in frame 2:
    f();
    This works well For Excute Function on entering Frame Once !! thanks ...
    but Only 1 More Question :
    as You told me in your No.2 Replay :
    I try to add some movieclip with instance name Or FLv playback with instance name and then Try to use this codes :
    mymc.addEventListener(Event.ADDED_TO_STAGE, addedF);
    function addedF(e:Event):void{
    trace("I Start");
    mymc.addEventListener(Event.REMOVED_FROM_STAGE, removedF);
    function removedF(e:Event):void{
    trace("I exit");
    why The removedF function Works well and the addedF function not work ?!?   in fact nothing Happend on Enter This Frame but on exit i see my I exit Trace !!

  • Loading a video/image on entering and exiting a marker

    Hi,
    i am doing a project with Adobe director. I was wondering if
    there is any piece of code I can use if I want to run a flash file,
    for example, when I go to a marker. So that I run a flash flash
    before the marker loads and similarly run another flash file when I
    click on some other marker and exit that specific marker.
    I want to run the flash file before the contents of the
    marker is displayed and similarly for exiting????
    ASAP....thanks in advance

    For the start of the new section, you could put the Flash
    sprite at the marker,
    have it play and then, when it finishes, move to another
    frame and show the new
    content. If the Flash sprite is integral to the content, then
    just have it play
    at the frame where the marker is located.
    When you want to leave a particular area, have the
    navigation button store the
    new marker's name in a variable and then play the closing
    Flash sprite. When
    the Flash finishes have it tell the play head to move to the
    marker that is
    stored in the variable.

  • "Monitor Enter" and "Monitor Exit" events using JVMTI?

    Is there any way I can record when a thread acquires or releases an object monitor using JVMTI?
    There is a "Monitor Contended Entered" event in JVMTI but it's only sent after a contention - I want to be notified whenever a monitor is entered.

    All I can think of is using BCI to instrument all the synchronized methods, all the monitorenter and monitorexit
    opcodes, and also the JNI MonitorEnter and MonitorExit calls.
    It's possible anyway, I'm not sure how easy it would be or how well it would work.
    You might just want to somehow acquire the monitor artifically (JNI MonitorEnter?) and catch the contention event,
    but it will get rough if other threads are also after this monitor.
    Tough problem.
    -kto

  • Can Video widgets start and stop when entering and exiting the browser viewport?

    I like to use multiple autoplaying/looping video clips on a single page but I need to figure out how to make the videos start only when they enter the viewport on a browser and stop after they exit the viewport. Does anyone know a way to do this?

    I do not know if this can have an affect on it but the videos are being downloaded through multiple computers to a private server and being accessed through the mac. Please let me know what you think.

  • Enter and exit a case structure

    I'm currently building a control.  I have a condition for three booleans to become true to enter a case structure as true.  One of the conditions is a temporary increase in temperature. I want to stay in the case structure after the temperature becomes false but both of the other booleans stay true. Is there a way to do this or should I be using some other technique?
    Thanks,
    Colt

    I think this guy is running into the same misconception I and many of my classmates ran into about LabVIEW back in the day.  When your code enters the True Case, it will complete the True Case and immediately exit the True Case to complete whatever other tasks that may be outside of the Case Structure (assuming it didn't already do them). Then, the while loop (you must have a while loop) will move on to the next iteration, meaning it will do it all over again.
    Now, if you know already know and understand how code works in general (about iterations) then do forgive me.  I've edited a lot of student code and have seen this very mistake.  A misunderstanding of the fact that code reiterates and will do it all over again if not told to do something else.  Typically the mistake is made with Event Structures.  I know it doesn't make much sense to not understand that...but trust me, it makes sense to those who don't understand.  ha

  • My iPhone is constantly entering and exiting the load-up screen

    Hello Apple Support, I'm having troubles with my iPhone 4s ( possible firmware damage ).
    Prior to the current problem I had a flat battery.
    I went back home to charge my phone which was stuck on the charger for the rough 4 hour minimum quota. After that the phone forced itself into recovery mode ( which seems apparently to have happened to many individuals prior to my error ).
    So I've connected it to iTunes and followed through the manual recovery troubleshoot ( as shown by this link https://discussions.apple.com/message/24076492#24076492 ), and it was apparently error 9.
    After solving error 9, my phone showed up with error 11 which according to my provided source ( http://theiphonewiki.com/wiki/ITunes_Errors ) says that there is possible firmware damage.
    After various attempts to revive my phone ( which I've now been doing for the past 2 hours ), my phone forced itself out of recovery mode, only this time...
    The load-up screen seems to be corrupted.
    Instead of the initial load-up screen > recovery mode screen ( connect to itunes picture with cable ), it now goes as the
    load-up screen ( 3 seconds ) > forced hard reset > back to load-up screen ( 3 seconds ) > forced hard reset again > rinse & repeat.
    I am now stuck because it seems possibly the firmware after my various attempts to save it ended up killing it... ( kinda like a cardiac surgeon gone nuts ).
    If possible I would like urgent help, thank you very much Apple.
    Possible req. info
    iPhone 4s Model A1387 8GB
    iOs before error : not sure but it should be well past iOS 7.0.2
    hardware condition : perfect condition ( no scratches / dents ), screen protectors both front and back.
    spare memory : 2.1GB
    time of purchase : Mid-January 2014 ( purchased off an optus [AU telecom company] dealer along with a plan )
    note : I am not a technology specialist ( should be the complete opposite actually ), just a simple highschooler who requires this for work and training related issues
    Thank You for your time.

    Update to whoever reads this.
    The back and forth load-up failure only occurs when I am connected to the computer.
    The phone enters the initial start up that every receives (The greetings along with language select and area), but unfortunately it tells me to connect to itunes which.... ends up with the initial problem we started with.
    I've managed to force my phone back into recovery mode with the demand for itunes whilst connected to the computer.
    I've tried to restore the phone through itunes but a problem occurs.
    Problem : once the extracting of software is complete, my phone resets itself which automatically disconnects itself from the phone causing the process to be restarted over and over again. I cannot get past the software extraction step because of this problem with the phone automatically resetting itself to cancel out this extraction.

  • When user enters and exits one movieclip, button changes color

    Hello,
    I currently have a slideshow-style navigation site.  There are five buttons on the bottom and when the user clicks each button, it triggers a nested movieclip to play.  I would like the button to be highlighted when the corresponding movieclip is playing, but when they click another button and another movieclip plays, I want the button to go back to its original color.
    The problem is that the movieclips that are playing are nested two levels down and the buttons have to be on the main timeline.  I think I might need an event listener to see if a certain nested movieclip is playing, to know to change the button color.  It seems to easy but I can't figure it out, thanks for any help!

    Hi again!  Sorry, I keep changing my mind on whether I've figured this out or not.  Now I need the buttons to become disabled when they are highlighted and active.  I tried putting a:  btns[i].enabled = false;  in the else part of the for-else statement and it didn't work.  Where would I put that kind of code?  Thanks!
    stop();
    //attach sounds
    Sound1 = new Sound();
    Sound1.attachSound("Sound1");
    Sound2 = new Sound();
    Sound2.attachSound("Sound2");
    Sound3 = new Sound();
    Sound3.attachSound("Sound3");
    //buttons
    //nav buttons
    b1.onRelease = function() {
        gotoAndStop(1);
        stopAllSounds()
        activeBtn(b1);
    b2.onRelease = function() {
        gotoAndStop(2);
        stopAllSounds();
        activeBtn(b2);
    b3.onRelease = function() {
        gotoAndStop(3);
        stopAllSounds();
        activeBtn(b3);
    //array for highlighted button state
    var btns:Array = [b1, b2, b3];
    function activeBtn(mc:MovieClip):Void{
       for(var i:Number=0; i<btns.length; i++){
          if(btns[i]!=mc){
             btns[i].gotoAndStop("inactive");
          }else{
             btns[i].gotoAndStop("active");

  • Iphone 6 on iOS 8 is freezing and lagging occasionally esp when entering and exiting the Facebook app?

    Am I the only one experience this?
    Also the spotlight search results sometimes don't return any web results.
    Wifi is extremely slow, forcing me to use my mobile data at home.
    Random reboots
    Most recently, my phone was accessing apps and clicking on things without my permission. I was had it on the passenger seat in the car and looked over and it was doing it's own thing?
    Touchscreen becomes unresponsive occasionally.

    Adding to the list of features not working(I don't know how or if I can edit my original post):
    - Apple Pay
    - Voice to Text (Dictation)
    I was trying to use Gmail on Wi-Fi, but kept getting an offline error until I switched to LTE. This could be a Gmail glitch so I am not going to consider it as a Wi-Fi problem until I'm certain since Gmail worked fine on Wi-Fi during all this in the past.
    So far, I have tried to restore my device from a backup and reset my network settings but neither have fixed the problems listed.
    I have also opted to send Diagnostic & Usage data to Apple in hopes this bug will be fixed in a later update.
    I also remembered when I first had to instal iOS 8.3. My Wi-Fi and LTE were not connecting to Apple to verify the software install, so I used a family member's (using the same phone carrier and plan as me) iPhone 6 Plus's hotspot  to connect to their LTE to download iOS 8.3 in attempts to fix this.

  • Ipod nano resets when I click on music, and exit podcasts.

    As the subject say's, on my 4GB black, ipod nano when I click on the music tab it resets, bringing up the apple logo and goes back to the main menu. Same thing happens when I exit the podcasts menu, I can listen to a podcast but when I exit podcasts and go back to the main menu it resets bringing up the apple logo again and going back to the main menu. I can do every thing else view Photos go into the Extras tab, Settings and even Shuffle Songs which play fine. I can enter and exit these with no problems. When I plug it in to my computer it's fine even in itunes it's fine I can play anything and do anything. I did a restore of the software already and it fixed nothing, I’m all out of ideas.
    Please help thanks.
    CoH
    4GB ipod nano Windows XP

    I think I figured it out. Podcasts are the culprit, if you set up you your iPod nano to automatically update podcasts and it downloads them on to the iPod, it causes an error in the iPods software, causing it to restart when you click on music or leave the podcast menus. So I changed the settings to manually update podcasts. Putting my podcasts manually onto the iPod, they show up in the Podcasts playlist under my iPod nano menu (which shows automatically) in iTunes. This is when the error starts, when I undock my iPod nano and go to music sure-enough it restarts, I plugged it back into my computer and deleted the podcasts, undocked it and it was working fine. I converted the podcasts to AAC and then put them on the iPod. They did not show in the Podcasts playlist, they just show as normal songs, and when I undock it it works fine. Now I know that they don’t have to go into that playlist and that I can create my own smart-playlist. But it should not do something like this. I’ll make a new thread about this problem.
    Thank you all for the help.
    CoH

  • Servlet Exec Thread Monitor - MII 11.5

    We have some reports that get "stuck", and they consume CPU usage, so we have to go into Servlet Exec's Thread Monitor to kill these reports.
    Currently, we go into MII to manually check to see if there are any stuck reports.  It would be nice if we could have MII load these log files automatically and send us an eMail when a report is stuck, so I thought we could use the HTML loader to do this.  The problem is Servlet Exec has security, and it requires an ID and Password.  I thought I could use the HTTP Post action block to get around this, but for the life of me, I can't get it to work.
    Is it possible to use Logic Editor to open Servlet Exec's Thread Monitor screen, and if so, how?

    Hi Lino,
    Keep the original code of the applet.
    <APPLET NAME="myChart" CODEBASE="/Illuminator/Classes" CODE="iChart" ARCHIVE="illum8.zip" WIDTH="840" HEIGHT="400">
    <PARAM NAME="DisplayTemplate" VALUE="Demo_Project/Vale_POC/SampleChart.xml">
    <PARAM NAME="QueryTemplate" VALUE="Demo_Project/Vale_POC/QryValePOC.xml">
    <PARAM Name="TagName.1" VALUE="CylTemp1">
    </APPLET>
    In 11.5 existis guest user. add two parameters in you applet.
    <PARAM NAME="IllumLoginName" VALUE="Guest">
    <PARAM NAME="IllumLoginPassword" VALUE="Guest">
    I believe the best solution would be to use the SAP MII portal for developing your application and not the. NET. In SAP MII already have a lot tools ready for development of application.
    If you use frame follow the link.
    http://help.sap.com/saphelp_xmii115/helpdata/en/Security/Programmatic_Logins.htm
    Hope this help.
    Danilo Santos

  • Monitor enters suddenly power save mode locks up machine

    monitor enters suddenly power save mode locks up machine
    I have all power saving  settings at never in windows
    I had 4x in 9 months  bizarre crash suddenly my monitor turned black then went into energy saving mode then I was unable to reset using button I had to shut down by turning off power supply
    HELP
    amd quad core 980 msi 890fx-gd65                    corsair twinx ddr 1333 2x2 gb
    seasonic s series 520w psu
    swiftech polaris129                        powercolor 6790
    coolermaster storm enforcer 2x 200mm
    dell Dell UltraSharp U2212HM

    Well, a few things could cause such a problem and it could be a true pain in the butt to narrow down.
    How old is the computer? 9months
    When this happens, is it when you are playing a game or other high load process?first times on web last 2 idle
    If so are you keeping track of temperatures via core temp or some other program?using speccy and bios
    Anything in the event log? nothing unfortunately
    Any Graphical distortion other than the screen turning black or do you ever see a window popping up telling you a driver re-set was required. some window screen almost overlay in photshop 7 intermittent
    Have you run memtest to check the memory? some portable apps and benchmarking apps
    If its not a new comp, have you cleaned the comp recently and verifed all the fans are working.
    Have you done an error check on the HDD? fans are ok
    running win xp sp3

  • HT1212 my ipod screen is cracked and i can't sync my ipod on to itunes becauseit it is locked with a password and i can't enter the password because the heat sensor is messed up and i don't want t restore it and lose everything so how can i get passed tha

    My ipod screen is cracked and i can't sync my ipod to itunes because it is locked with a password and i can't enter the password because the heat sensor is messed up on the ipod becasue of the screen and i don't want to restore it and lose everything. What can i do?!

    All you can do is to restore and thus erase the iPod unless you can get a data recovery company to preserve the data.
    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Wrong passcode results in red disabled screen                          
    If recovery mode does not work try DFU mode.                         
      How to put iPod touch / iPhone into DFU mode « Karthik's scribblings

  • Why is my last thread I entered locked?

    Can somebody tell me how to unlock my last thread I entered which is "I search for the SAP transaction for customer part-payment" Thanks, Anita

    Dear Anita,
    Partial payment is a standard SAP functionality. The rules of this forum do not allow asking basic questions. Before posting a thread try searching the forums and SAP main Help portal (help.sap.com). You will find the answer there...
    Best regards,
    Eli

  • My company loaded profiles onto my iPad for email and calendars.. There is also a signing certificate and a certificate. What are these for? Additionally are they able to monitor apps and usage, ie Internet usage when it is not on their wifi?

    My company loaded profiles onto my iPad for email and calendars.. There is also a signing certificate and a certificate. What are these for?
    Additionally are they able to monitor apps and usage, ie Internet usage when it is not on their wifi?
    I do not have any VPN enabled?

    Do you happen to have an Android?  If so and depending on what version there is a great data usage analyse tool built-in.  See if you can go to Settings -> Data Usage  from there you can pick a current or previous billing cycle and then use the vertical sliders to select a date range and it will filter the usage data per app to show you exactly what app(s) were using data during that time frame.

Maybe you are looking for

  • Upgrade to iphone 5 and keep unlimited data from an old blackberry?

    To Whom this may concern, I currently have a family plan with 5 lines (1 basic phone, 2 iphone 4s, and 1 blackberry bold). Both iphone 4s phones have 2gb of Internet data a month and the blackberry has unlimited internet data. I have 2 upgrades on my

  • Setting custom table attribute set value in region item table

    Dear all I am working on oracle application customization and extension in oracle JDeveloper R12. I am finding a difficulty in an query region of a OA framework page My Entity object is on the table FWK_TBX_ADDRESS table and VO objects has the fields

  • TS4268 How do I get facebook to say "posted from IPhone" when using my IPhone?

    When posting anything on facebook from my Iphone 4s. it tags as "posted from Mobile" how can I get it to say posted from Iphone. and yes I  downloaded the facebook app from the app store and when using the app it still says from posted from mobile. i

  • Pass information to a FileChooser

    Any FileChooser experts out there? I have another question. I did a little searching, but not even sure how to search for this answer. I have a FileFilter that makes some files visible and others not based on the extension. I would like to make this

  • Appleworks documents and Coverflow

    My AW documents do not "preview" in cover flow, but .doc's do. Already did the preferences wipe as suggested in other threads. Any suggestions?