How Hprof track object allocation?

I'm learning to use JVMTI.
I BCI the class by java_crw_demo.dll to track allocations of object and array,
and I use ClassLoad callback to track class objects' allocation.
But about 4000 allocations of [Ljava/lang/Object are missed when comparing to Hprof, except this, the tracked allocations are exactly the same with Hporf.
Why?
Any help is greatly appreciated.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Do you have ClassLoad enabled in the start phase?

Similar Messages

  • How to tracking Objects in Labview

    Hi, I am using Labview to carry out object tracking, I have to identify a particular object in an image, and as the images changes, I need to determine the pixel coordinate or location on the images. I have been finding it really hard getting this done using IMAQ Vision and motion module, I know there should be a way but it has been extremely difficult for me cause I am not too good with the software.
    Please I will appreciate any advice, suggestion or clues as to achieve this task, similar VI that give similar results if available will also be appreciated.
    Thank you.
    Akeem Raji
    MSC Mechanical Engineering
    UCL. 

    Sounds like you have a whole new issue.  You should start a new thread and tell us exactly what you need help with.  What have you tried?  Where are you stuck?  Show code where available.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How Are New Objects Allocated?

    Let's say your have:class MyClass {
      int mOnlyMember;
      public void method1() {
        //a huge complex method body
    }When you create a new instance of MyClass, I know new memory is allocated for mOnlyMember, but is new memory also allocated for method1()? That is, does each object have it's own copy of the method? More to the point, when I create a new instance of MyClass, is it expensive (because the method body is so complex) or is it cheap (because there's only a single int member)?
    Thanks for any clarification,
    Johh

    i'm not very sure about the memory allocate for
    method.... but, it should be allocate for the method
    too...Er, no. The code of the method body exists only once
    per class. All the instances (the objects you create)
    share the same code. Each instance (object) has its
    own copy of instance (non-static) member variables,
    and each method invocation has its own copy of the
    variables that are local to that method.
    Okay... learned.... :)
    >
    however, creating an new instance is expensive... we
    normally will try to reuse an instance ifpossible...
    Um, you might want to recheck your facts on this.
    http://www-106.ibm.com/developerworks/java/library/j-jt
    01274.htmlIs it... I always thought like that because i readed this fact in some book... Hmm... maybe i will recheck this again....

  • How to track changes

    Hi friends,
        I am a XI consultant. My query is regarding how to track the chages.I heard that CDHDR and CDPOS tables are used to store the information regarding the changes made to the objects/tables in SAP.My scenario is i have a table having few fields related to P.o and a flag indiacating Insert/Update/Delete, so upon the creation/upadate/deletion of a P.O(related to perticular WBS Element) i want the data to be  transfered into my table automatically.
       Is there any standard transaction available to do that....means i want to track all the P.Os under a perticular WBS element..
    If not Do we have to write a Abap program and use CHANGEDOCUMENT_READ_HEADERS,CHANGEDOCUMENT_READ_POSITIONS functions to store the data into internal tables ?????
    Regards,
    Gowtham K.

    HI gowtham,
    Yes, u are right,
    we have to right some abap code.
    "CHANGE DOCUMENTS" in SAP Terminology
    1 The same thing which u are asking
    we had developed here. For Eg : Any change
    in the material master will be detected
    and a mail will be sent to the concerned
    employee.
    THIS WILL ALSO DETECT WHICH FILEDS HAVE CHANGED.
    IT CAN ALSO GIVE, The Old Value, And The New Value.
    2. This Mechanism is called CHANGE DOCUMENTS in
    SAP Terminology
    3. 2 Fuction Modules are Required.
    (They will fetch necessary data from CDHDR,CDPOS)
    CHANGEDOCUMENT_READ_HEADERS
    CHANGEDOCUMENT_READ_POSITIONS
    4. The First FM gives list of all
    records ( with change no) which have changed.
    5. Loop at the above and the second FM will
    provide the details (old-val, new-val) for
    each record.
    6. While using 1st Fm, i used docclass as 'MATERIAL'.
    BCOS
    the concept of change documents is applicable
    to other type of documents also (depends upon
    customization)
    regards,
    amit m.

  • How to track changes in a hyperion application for SOX control?

    Hello all,
    We have been working on identifying the best way on how to track changes in a hyperion application in regards to the SOX control.
    The following areas have been identified as the main areas of an application where the changes are to be tracked:
    Monthly data load from ODI
    Calculation of data
    Metadats change
    Formula edit
    Changes to reports
    Changes to security
    Can anybody please suggest the best ways to do this? Has anyone experienced this issue before?
    Somebody suggested that there is hyperion auditing available.
    Is there any other software that is available that can do this or just documenting the changes would be the best option?
    Please suggest. Toyr response would be appreciated.
    Thanks.

    Shared Services allows the auditing of provisioning and life-cycle management activities to track changes to security objects and the artifacts that are exported or imported using Lifecycle Management Utility.
    For Shared Services auditing, refer Page 129 of http://download.oracle.com/docs/cd/E12825_01/epm.111/epm_security.pdf
    Planning Administrators can select aspects of the application for change tracking. For example, you can track changes to metadata, such as when users change a member property or add a currency. You can also track changes in data forms, business rules, workflow, users, access permissions, and so on.
    For Planning auditing, refer Page 56 of http://download.oracle.com/docs/cd/E12825_01/epm.111/hp_admin.pdf
    HTH-
    Jasmine.

  • How to track the flow of data from R/2 to BI ?

    Hi Experts,
    Question: How to track the flow of data from R/3 to BI ?
    I want to load master data from R/3 to BI. In BI, i create an infopackage to load data from R/3. Under processing tab i set it as "PSA and then in the InfoObject (package by package)". Its a Full update.
    Now, i start the update to InfoObject. The load goes on well.
    Now, i want to track the flow of data from the master data table in R/3 to Datasource in R/3 then Extractors and then in the PSA in BI and then till the InfoObject. That is the complete flow of data from source table (in R/3) to Target table (in BI).
    Please help me know how this can be done. (For example lets take cost element master data)
    Regards,
    Suraj S Nair

    Hi,
    Data flow :
    BW :
    When u right click on the Master Data Info object -> Select Data flow.Then  it will  show u the details like DS name,IS (If 3.x)
    Once u know the DS then you need to find out the source tables for the R/3 DS.This information will get using ROOSOURCE or ROOSFIELD tables  or help.sap.com.
    My suggestion better to search in Help site for DS source tables.
    DS Tables :
    The following link will provide you the source tables for some of the LO DS.
    https://wiki.sdn.sap.com/wiki/display/BI/BWSDMMFIDATASOURCES
    Regards
    Ram.
    Edited by: Ramakanth Deepak Gandepalli on Dec 22, 2009 9:29 AM

  • How to track the transport request number for the Role/Composit Role

    Hi,
    How to track the transport request number for the Role/Composit Role.
    Thanks,
    Ravi

    Use transaction SE03 Transport Organizer Tools
    Execute "Search for Objects in Requests/Tasks" with objects of types:
    R3TR     ACGR     Role
    R3TR     ACGT     Role - User assignment
    Regards

  • How to track materails of machines  after repair.

    Hi experts,
    How I track the repairable material  after repair along with equipment no. Suppose I have 1 press machine having 100 motors of different rating  & suppose I maintained itu2019s sr no  .Then is it possible to get the equipment no in IW81 refurbishment selection screen & how I track material of specific machine from sr no.
    With Regards,
    Avi DDS

    Have You Created 100 Motors of Press Machine as Individual Equipments , if that's the Case Then you can create Synchronization of Serial number with Equipment Number in Material master of Motors of Differnt Rating.
    Result You get Serial Number same as Equipment Number or Name, this way you can search the individual Equipments  of Press Machine.
    Otherwise Assign  serial number i.e,, Name of individual Equipment or Name of Main Press  for individual Material at the time of Refurbishment Order Creation
    Equipment No in refurbishment order is given in "Objects" Next to Quantity in Order Header Tab .
    Regards,

  • Gr/ir wrong posting account-how to track error

    Dear Expert,
    For some PO, there were wrong posting in IR.After checked in OBYC and material master, user has already maintained the valuation class and the customizing also correct.
    How this could be happened since the customizing and val.class already correct?
    How to track the caused of error then?
    Please advice.
    Thank you.

    Hi Susmitha,
    You need to develop a small report for this. SAP stores the delivery information of email in SOST table.
    The emails are stored in this table with message type (msgty) 'S' or 'I'.
    If the emails are delivered the message no. (msgno) in this table becomes '711' or '701' or '73'. For all other message number it indicates the message is not delivered.
    However the table is updated after a certain time limit (half an hour to two hours normally) to get the delivery status of the email. So you need to run the report after a certain time to get the actual delivery status of email. There may be few cases where the delivery status may be update after 24 hours also if performance is slow of the system. But normally this does happen in a normal condition. But this is the table where you can identify the delivery status of the email.
    When you are sending email using FM SO_DOCUMENT_SEND_API1, SAP generates an uniques object number for each email. It can be found in the importing parameter of the FM in field new_object_id+5(12). You need to store this object number so that you can search with this in SOST table to get the delivery status.
    Hope it helps.
    Thanks,
    Nirmalya

  • How to track bug - Program stopped responding.

    Occasionaly my app crashes with just the common Windows' message - Program stopped responding. I get no error message. How to track the bug?
    ... Podlesnick ...

    Sounds like there's an unhandled exception that's perhaps occurring on a background thread.  I suggest adding an event handler for your AppDomain's UnhandledException event and putting some logging in there:
    https://msdn.microsoft.com/en-us/library/system.appdomain.unhandledexception%28v=vs.110%29.aspx
    You may also need to modify your application's default unhandled exception behavior:
    https://msdn.microsoft.com/en-us/library/ms157905%28v=vs.110%29.aspx
    The information on the above pages should be enough to ensure almost* all exceptions can get caught by your code before triggering Windows Error Reporting.
    (*Exceptions caused by the whole system being in an unstable state, such as a kernel mode issue, may not be caught - at that point all bets are off).
    Quanta,
        I think that there is a bug in your thinking.
     - I agree that a worker thread may cause a Kernel error
     - I agree that this kernel error may cause the application to get unstable and can cause the UI thread to start to hang waiting for a return value
     - And I agree that if this happen then this message will pop 
    However,
     - If the error was silent, it is that the worker thread never returned (Otherwise, the error would have been propagated.
     - If the message has popped, it is that the UI thread is hanging (deadlocked)
    Then if all your threads are blocked, ... Which thread will raise the Unhanded exception event?? ... all your threads are stopped or blocked somewhere.
    This is why In the code example I showed, I used a Timers.timer to create the exception and stop the application. The Timers.timer object bring a new thread in the application when the application start to hang. This thread can be used to resolve the situation.
    I choose to Abort the UI thread as it is the only logical thing to do. Plus doing this gives us the stack trace and info needed for debugging

  • How to create objects in stack

    I am working on Weblogic 10 and JDK 1.5. In Java the objects are always created in heap. Can anybody tell me how to create objects in stack?

    SKMoharana wrote:
    i need objects to be allocated in stack as my application should respond in real time (time predictable).I heard this is possible in Mustang.If I am understanding you correctly, allocating objects on the stack will not help you, and creating objects on the heap will not hurt you.
    It is provably impossible to create a truly time predictable application (in any language), so what you're really looking to do is create a program that responds acceptably quickly for an acceptable percentage of the time. For this you can create benchmarks like "responds in 250 milliseconds or less 99.5% of the time".
    To this end, you could create a prototype program that creates the objects you wish on the heap, and see if there actually is a problem. Don't fall into the trap of premature optimization.
    Even if you do discover that your object creation IS the problem, heap allocation is not the problem. Take a look at this article. It takes ten machine instructions, less than 1 millisecond, to allocate an object.
    Your performance problems are most likely in the object initialization (look for long loops or deep recursions), the display (if this is a GUI application), or your network connection (if this is a web application).

  • Reassign Track Object not working

    For some reason the "Reassign Track Object" function doesn't seem to work for me. By this I mean, reassigning a track object does not change MIDI routing. For example, I can create an empty project with one software instrument track, set it up with any old synth for input, and the reassign the track object to "No Output", but when I play something on my keyboard the synth still plays. Or I can reassign a track object to an Arpeggiator connected to the synth, and notes are not arpeggiated (I am aware you have to have pressed play... no dice).
    What's odd is that while the name on the track in the actual track listing changes to, say, (Arpeggiator), the name of the track in the inspector doesn't change (it folds up, but I can still open it and make changes to the track object that the track shouldn't be assigned to anymore). Any ideas how to resolve this? It's pretty annoying, since I apparently can't reroute any of the MIDI data entering the arrange window.
    I just tried playing with all of this for the first time and at the moment I'm not connected to all of my usual gear, which means when Logic opens it displays the following messages:
    The previously selected audio interface is not available.
    and
    Device "microKONTROL #2" is assigned to MIDI Port "Port 2" which is not present.
    Don't know if these messages are relevant...
    Thanks!

    Hey SURANJAN,
    It looks like you have a MacBook, so I'd start troubleshooting the trackpad issues with these steps:
    Try disconnecting the MagSafe connector from the computer and check the trackpad function. If the trackpad becomes responsive again, improper grounding may be the issue.
    If a two-prong AC plug is being used with the power adapter, try using the three-prong power cable that shipped with your computer and plug it into a grounded outlet.
    If the issue persists, make sure the third prong is present and do not use an adapter to enable the three-prong adapter to be used in a two-prong outlet. Note that the ground in the three-prong outlet may not be connected. This is common in older homes or buildings with replaced outlets. In these situations, the three-prong power cable will not improve trackpad responsiveness.
    If a grounded outlet is not available, rest your palm on the palm rest when using the trackpad. This should enable the trackpad to function properly.
    via: Intel-based Mac notebooks: Troubleshooting unresponsive trackpad issues
    http://support.apple.com/kb/TS1248
    And, also, the steps in this document:
    Portables and Magic Trackpad: Jumpy or erratic trackpad operation
    http://support.apple.com/kb/TS1449
    Have a great day,
    Delgadoh

  • How is the product allocation  work?

    How is the product allocation  works? (material master: Basic Data 1,) where is the place to maintain the parameters?
    point will given

    Product Allocation
    Configuration Overview; Allocation Specific Usage
    1.Allocation Procedure (OV1Z) The product allocation procedure is the parent of the entire allocation process. All materials that are to be included in the allocation scheme are required to have an allocation procedure assigned to it in the material master. In addition, as of release 4.0, it is in the procedure that the method of allocation is defined. The user has the opportunity to set an indicator to identify their choice of two different methods (discrete and cumulative allocation) to evaluate the quantities to be considered for product allocation.
    2.Allocation Object (OV2Z) The allocation object is the root level of the allocation process where actual data is entered and planned in LIS. The object allows the user to further break down a procedure into smaller parts for future validation of components comprising a specific material
    3.Allocation Hierarchy Mapping (OV3Z) Primarily, this transaction permits the assignment of an allocation procedure to an LIS information structure. Secondly, a character is assigned to the information structure to permit collective planning. Finally, the user can assign a step level to the procedure and information structure to sequence the order in which allocation quantities are checked. This functionality allows the user the opportunity to check product allocation against several product allocation scenarios, before the required quantity is confirmed
    4.Define Consumption Periods (OV5Z) The allocation consumption periods functionality is only valid if the allocation method flag has been set (OV1Z). If you have de-selected the method field, this functionality is not available. The consumption window indicates the number of past and future periods to be used in the allocation check.
    5.Control Product Allocation (OV4Z) In order for the allocation process to function properly, allocation control records are created primarily to map allocation procedure steps to their corresponding objects so that the allocation data records can be located for validation. Secondly, validity periods must be established to indicate when the allocation control records are active. Finally, the user has the option of establishing a conversion factor per allocation control record to accommodate BOM listings of constrained materials
    6.Activate Allocation for Requirement Class (OVZ0) In order to turn on allocation in the standard order processing functionality, the requirements class must have a flag indicating that allocation is relevant.
    7.Activate Allocation for Schedule Line Category (OVZ8) In order to turn on allocation in the standard order processing functionality, the schedule line must have a flag indicating that allocation is relevant
    8.Create Planning Hierarchy (MC61) In order to adequately establish allocation quantities, the user must initially determine the level at which the allocation is to take place and the aggregation factor of the allocation quantities. In this step, the levels for the collective allocation search procedure are also identified.
    9.Generate Masking Character (OV7Z) Upon completion of the level determination for the planning hierarchy, the collective allocation masking character must be generated to allow aggregation indicators to be established. This transaction simply reads the hierarchy established in the planning table and then generates a collective mask character for each level of the hierarchy
    10.Modify Planning Hierarchy (MC62) This step is a repeat of MC61 where the initial hierarchy was established. In order to complete the hierarchical set up, the collective allocation (mask character) hierarchy must now be maintained with the appropriate aggregation factors
    11.Allocation Procedure Assignment to Material Master (MM02) At the root level of the allocation process are the materials. Each material that is to be considered in allocation scenario must be mapped to an allocation procedure. In order entry, then, when a material is entered with a valid allocation procedure in the material master, the allocation data is verified prior to confirming the line item ordered
    12.List of Suitable Structures (OV9Z) This report is used to identify potential LIS information structures that can be used in the product allocation process. This report simply reads through the data dictionary and selects all the active information structures that contain the field product allocation object (KONOB) as the first field. This data can then be utilized in the mapping transaction (OV3Z) to link the allocation procedure step to an information structure (previous step).
    Regards
    Jitesh

  • ASAP: How to track connection lickage in Java

    1) How to track is their any connection linkage at any point during my program execution ?
    If yes than how to do that? Is their any java API or java program to track and solve that?
    Or I have to check in Database?? If in Database what will be the procedure to do that?
    How to track is their any connection linkage at any point during my program execution ?
    If yes than how to do that? Is their any java API or java program to track and solve that?
    Or I have to check in Database?? If in Database what will be the procedure to do that? Help Please

    Hi
    I am not sure how you obtain a DB connection...
    but you could use the class below to wrap an instance of a real database connection (java.sql.Connection)
    like this
    public static java.sql.Connection getDBConnection() throws java.sql.Exception
      java.sql.Connection conn = ....... here you obtain connection from ... somewhere... like driver class of server connection pool .......
      //wrapp it here in the class I pasted below...  and return for other parts of code to use it..
      return new TestConn( conn );
    }Now, a HashSet variable available in TestConn.openedConnections will give you a set of objects OpenedConnection also defined below..
    Every time you obtain a connection with the method above an information about the connection gets added to the HashSet and every time
    the connection gets closed, an information about the connection is taken out from the HashSet...
    TestConn class:
    import java.sql.*;
    import java.util.*;
    public class TestConn implements java.sql.Connection, java.io.Serializable
        public static final int TRANSACTION_NONE = Connection.TRANSACTION_NONE;
        public static final int TRANSACTION_READ_UNCOMMITTED = Connection.TRANSACTION_READ_UNCOMMITTED;
        public static final int TRANSACTION_READ_COMMITTED = Connection.TRANSACTION_READ_COMMITTED;
        public static final int TRANSACTION_REPEATABLE_READ = Connection.TRANSACTION_REPEATABLE_READ;
        public static final int TRANSACTION_SERIALIZABLE = Connection.TRANSACTION_SERIALIZABLE;
        public static HashSet openedConnections = new HashSet();
        private java.sql.Connection conn = null;
        public TestConn (Connection conn)
            this.conn= conn;
            OpenedConnection newConn = new OpenedConnection(this.conn.toString(),System.currentTimeMillis());
            openedConnections.add(newConn);
        public void setTypeMap(Map<String, Class<?>> map) throws SQLException
            this.conn.setTypeMap(map);
        public void setReadOnly(boolean readOnly) throws SQLException
            this.conn.setReadOnly(readOnly);
        public void setAutoCommit(boolean autoCommit) throws SQLException
            this.conn.setAutoCommit(autoCommit);
        public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException
         PreparedStatement pstmt = this.conn.prepareStatement(sql,columnIndexes);
         pstmt.setQueryTimeout(10);
            return pstmt;
        public Savepoint setSavepoint(String name) throws SQLException
            return this.conn.setSavepoint(name);
        public void setCatalog(String catalog) throws SQLException
            this.conn.setCatalog(catalog);
        public void rollback(Savepoint savepoint) throws SQLException
            this.conn.rollback(savepoint);
        public void releaseSavepoint(Savepoint savepoint) throws SQLException
            this.conn.releaseSavepoint(savepoint);
        public String nativeSQL(String sql) throws SQLException
            return this.conn.nativeSQL(sql);
        public CallableStatement prepareCall(String sql) throws SQLException
            return this.conn.prepareCall(sql);
        public PreparedStatement prepareStatement(String sql) throws SQLException
            return this.conn.prepareStatement(sql);
        public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException
            return this.conn.prepareStatement(sql,columnNames);
        public void setTransactionIsolation(int level) throws SQLException
            this.conn.setTransactionIsolation(level);
        public void setHoldability(int holdability) throws SQLException
           this.conn.setHoldability(holdability);
        public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
            return this.conn.prepareCall(sql, resultSetType, resultSetConcurrency);
        public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
            return this.conn.prepareCall( sql,  resultSetType,  resultSetConcurrency,  resultSetHoldability);
        public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException
            return this.conn.prepareStatement( sql,  autoGeneratedKeys);
        public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
            return this.conn.prepareStatement( sql,  resultSetType,  resultSetConcurrency);
        public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
            return this.conn.prepareStatement( sql,  resultSetType,  resultSetConcurrency,  resultSetHoldability);
        public Savepoint setSavepoint() throws SQLException
            return this.conn.setSavepoint();
        public void rollback() throws SQLException
            this.conn.rollback();
        public SQLWarning getWarnings() throws SQLException
            return this.conn.getWarnings();
        public Map<String, Class<?>> getTypeMap() throws SQLException
            return this.conn.getTypeMap();
        public int getTransactionIsolation() throws SQLException
            return this.conn.getTransactionIsolation();
        public DatabaseMetaData getMetaData() throws SQLException
            return this.conn.getMetaData();
        public int getHoldability() throws SQLException
            return this.conn.getHoldability();
        public String getCatalog() throws SQLException
            return this.conn.getCatalog();
        public boolean getAutoCommit() throws SQLException
            return this.conn.getAutoCommit();
        public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
            return this.conn.createStatement( resultSetType,  resultSetConcurrency,  resultSetHoldability);
        public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException
            return this.conn. createStatement( resultSetType,  resultSetConcurrency);
        public Statement createStatement() throws SQLException
            return this.conn. createStatement();
        public void commit() throws SQLException
            this.conn.commit();
        public void close() throws SQLException
            OpenedConnection toRemoveConn = new OpenedConnection(this.conn.toString(),System.currentTimeMillis());
            this.conn.close();   
            this.openedConnections.remove(toRemoveConn);
        public void clearWarnings() throws SQLException
            this.conn.clearWarnings();
        public boolean isClosed() throws SQLException
            return this.conn.isClosed();
        public boolean isReadOnly() throws SQLException
            return this.conn.isReadOnly();
    OpenedConnection class
    import java.util.*;
    public class OpenedConnection implements Comparable, java.io.Serializable
        public String connectionID = null;
        public long openTime = 0L;
        public OpenedConnection(String connectionID, long openTime)
            this.connectionID = connectionID;
            this.openTime = openTime;
        public int hashCode()
            return this.connectionID.hashCode();
        public int compareTo(Object o)
         return this.connectionID.compareTo( ((OpenedConnection) o).connectionID );
        public boolean equals(Object obj)
         return this.connectionID.equals( ((OpenedConnection) obj).connectionID );
        public String toString()
         return this.connectionID;
    }I hope it helps
    Thomas

  • Why are object alloc delays occuring outside of GC?

    Hi
    I'm currently tuning an application which has a low latency transaction requirement (sub 5ms ideally), hence we're using JRockit RT with an 8ms deterministic strategy (we're not achieving 8ms GC pause, but some time ago we experimented and found this was a good setting for us).
    I'm currently focused on addressing latency spikes which we're hoping to bring down from many hundreds of ms to the order of 10-20ms. Many of the spikes are occurring during GC activity as one would expect, but I'm currently looking at some spikes outside of GC which I'm struggling to understand the cause of. What I seem to be seeing is object alloc delays which are occuring and then being resolved, but outside of any GC activity.
    For example, see the following snippet from the log. Cmd line params include:
    -Xverbose:memory,memdbg=debug,gcpause=debug,compaction,gcreport,refobj
    -Xgcprio:deterministic
    -Xpausetarget=8ms
    Version=
    java version "1.6.0_05"
    Java(TM) SE Runtime Environment (build 1.6.0_05-b13)
    BEA JRockit(R) (build R27.6.0-50_o-100423-1.6.0_05-20080626-2104-linux-x86_64, compiled mode)
    [memory ][Wed May 26 12:31:38 2010][23134] Pause 'OC:Cleanup' took 0.179 ms (ended at 1545.738649 s).
    [memory ][Wed May 26 12:31:38 2010][23134] 1539.900-1545.738: GC 13279297K->11726889K (14680064K), sum of pauses 386.637 ms
    [memdbg ][Wed May 26 12:31:38 2010][23134] Page faults before GC: 1, page faults after GC: 1, pages in heap: 3670016
    [finaliz][Wed May 26 12:31:38 2010][23134] (OC) Pending finalizers 0->0
    [memdbg ][Wed May 26 12:31:38 2010][23134] Restarting of javathreads took 0.257 ms
    *[gcpause][Wed May 26 12:31:38 2010][23134] Thread "pool-1-thread-1" id=217 idx=0x36c tid=25388 was in object alloc 75.397 ms from 1546.387 s*
    [memdbg ][Wed May 26 12:34:04 2010][23134] GC reason: Other, cause: Memleak Request Data
    [memdbg ][Wed May 26 12:34:04 2010][23134] Stopping of javathreads took 0.817 ms
    [memdbg ][Wed May 26 12:34:04 2010][23134] old collection 38 started
    [memdbg ][Wed May 26 12:34:04 2010][23134] Alloc Queue size before GC: 0, tlas: 0, oldest: 0
    [memdbg ][Wed May 26 12:34:04 2010][23134] Compacting 1 heap parts at index 44 (type internal) (exceptional false)
    The above log segment shows the tail of a GC which has just completed, then an object alloc delay for 75ms for thread "pool-1-thread-1", and then a subsequent GC kicks in much later which I believe is unrelated. I have a JRA trace from the test which shows that the object alloc latency event occurred almost a full second after the completion of the GC activity - something you can't see from the above trace which has second resolution in the timestamp.
    What I'm unsure of is exactly how the object alloc delay can occur and then be rectified by the JVM outside of a GC. I understood the main cause of an object alloc latency event was that memory wasn't available (i.e. TLA does not have enough free space and a new TLA cannot be allocated) and that a GC would be required to free up memory to allow either a new TLA to be allocated or free up enough space in an existing one. We see an "object alloc" latency delay which follows the above pattern after every GC so I'm guessing it must somehow be related to the GC which has just finished, but I can't figure out how. My hope is to eliminate this kind of latency delay completely or at least down to single-figure ms delays.
    Perhaps the deterministic GC means some memory reclaim is happening in parallel outside of the reported GC activity, but I'd be very surprised if this was the reason as surely the collector would be reporting it's activity more fully. It's been a while since I've looked this closedly at GC so I may have forgotten something.
    Any help you can provide in working out how to address such latency spikes would be very helpful!
    Thanks
    Stuart

    I think the extra time is due to the compaction of the heap (which occurs after a garbage collection).
    Note also that a very low pausetarget can stress the garbage collector to less appreciated behavior, when the application and the hardware or not appropriate. If you look at the application about 30% live data or less at collection time is something your application should strive at. Running with more live data might break the deterministic behavior (depending on the hardware of course).
    You can tune compaction with the determistic collector as follows,
    MEASUREMENT_ARGS="-Xverbose:gc,gcpause,memdbg"
    export MEASUREMENT_ARGS
    USER_MEM_ARGS="${MEASUREMENT_ARGS} -Xms512m -Xmx1000m -Xns256m -Xgcprio:deterministic -XpauseTarget=30ms -XXgcThreads:2 -XXtlaSize:min=2k,preferred=16k -XXcompactSetLimitPerObject:500 -XXinitialPointerVectorSize:40 -XXmaxPooledPointerVectorSize:8000 -XXpointerMatrixLinearSeekDistance:5"
    export USER_MEM_ARGS
    The last four options are used to tune compaction for the deterministic collector. In optimizing compaction try to reduce object references, because when a object is moved during compaction its references must be updated. So moving an object with a lot of references is more costly than moving an object with a few references.
    Refer to http://otndnld.oracle.co.jp/document/products/jrockit/jrdocs/pdf/refman.pdf for more information.

Maybe you are looking for