< prev index next >

src/share/vm/opto/runtime.cpp

Print this page




1541 
1542   return TypeFunc::make(domain,range);
1543 }
1544 
1545 const TypeFunc *OptoRuntime::dtrace_object_alloc_Type() {
1546   // create input type (domain)
1547   const Type **fields = TypeTuple::fields(2);
1548   fields[TypeFunc::Parms+0] = TypeRawPtr::BOTTOM; // Thread-local storage
1549   fields[TypeFunc::Parms+1] = TypeInstPtr::NOTNULL;  // oop;    newly allocated object
1550 
1551   const TypeTuple *domain = TypeTuple::make(TypeFunc::Parms+2,fields);
1552 
1553   // create result type (range)
1554   fields = TypeTuple::fields(0);
1555 
1556   const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+0,fields);
1557 
1558   return TypeFunc::make(domain,range);
1559 }
1560 






















1561 
1562 JRT_ENTRY_NO_ASYNC(void, OptoRuntime::register_finalizer(oopDesc* obj, JavaThread* thread))
1563   assert(obj->is_oop(), "must be a valid oop");
1564   assert(obj->klass()->has_finalizer(), "shouldn't be here otherwise");
1565   InstanceKlass::register_finalizer(instanceOop(obj), CHECK);
1566 JRT_END
1567 
1568 //-----------------------------------------------------------------------------
1569 
1570 NamedCounter * volatile OptoRuntime::_named_counters = NULL;
1571 
1572 //
1573 // dump the collected NamedCounters.
1574 //
1575 void OptoRuntime::print_named_counters() {
1576   int total_lock_count = 0;
1577   int eliminated_lock_count = 0;
1578 
1579   NamedCounter* c = _named_counters;
1580   while (c) {




1541 
1542   return TypeFunc::make(domain,range);
1543 }
1544 
1545 const TypeFunc *OptoRuntime::dtrace_object_alloc_Type() {
1546   // create input type (domain)
1547   const Type **fields = TypeTuple::fields(2);
1548   fields[TypeFunc::Parms+0] = TypeRawPtr::BOTTOM; // Thread-local storage
1549   fields[TypeFunc::Parms+1] = TypeInstPtr::NOTNULL;  // oop;    newly allocated object
1550 
1551   const TypeTuple *domain = TypeTuple::make(TypeFunc::Parms+2,fields);
1552 
1553   // create result type (range)
1554   fields = TypeTuple::fields(0);
1555 
1556   const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+0,fields);
1557 
1558   return TypeFunc::make(domain,range);
1559 }
1560 
1561 const TypeFunc *OptoRuntime::heap_object_alloc_Type() {
1562   // Keep it separate so that we don't have to worry if they change it.
1563   // create input type (domain)
1564   const Type **fields = TypeTuple::fields(3 LP64_ONLY( + 1));
1565 
1566   // Thread-local storage
1567   fields[TypeFunc::Parms+0] = TypeRawPtr::BOTTOM;
1568   // oop;    newly allocated object
1569   fields[TypeFunc::Parms+1] = TypeInstPtr::NOTNULL;
1570   // byte size of object
1571   fields[TypeFunc::Parms+2] = TypeX_X;
1572   // other half of long length
1573   LP64_ONLY(fields[TypeFunc::Parms+3] = Type::HALF);
1574 
1575   const TypeTuple *domain = TypeTuple::make(TypeFunc::Parms+4, fields);
1576   // create result type (range)
1577   fields = TypeTuple::fields(0);
1578 
1579   const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+0, fields);
1580 
1581   return TypeFunc::make(domain, range);
1582 }
1583 
1584 JRT_ENTRY_NO_ASYNC(void, OptoRuntime::register_finalizer(oopDesc* obj, JavaThread* thread))
1585   assert(obj->is_oop(), "must be a valid oop");
1586   assert(obj->klass()->has_finalizer(), "shouldn't be here otherwise");
1587   InstanceKlass::register_finalizer(instanceOop(obj), CHECK);
1588 JRT_END
1589 
1590 //-----------------------------------------------------------------------------
1591 
1592 NamedCounter * volatile OptoRuntime::_named_counters = NULL;
1593 
1594 //
1595 // dump the collected NamedCounters.
1596 //
1597 void OptoRuntime::print_named_counters() {
1598   int total_lock_count = 0;
1599   int eliminated_lock_count = 0;
1600 
1601   NamedCounter* c = _named_counters;
1602   while (c) {


< prev index next >