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(2); 1565 // Thread-local storage 1566 fields[TypeFunc::Parms+0] = TypeRawPtr::BOTTOM; 1567 // oop; newly allocated object 1568 fields[TypeFunc::Parms+1] = TypeInstPtr::NOTNULL; 1569 1570 const TypeTuple *domain = TypeTuple::make(TypeFunc::Parms+2, fields); 1571 1572 // create result type (range) 1573 fields = TypeTuple::fields(0); 1574 1575 const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+0, fields); 1576 1577 return TypeFunc::make(domain, range); 1578 } 1579 1580 JRT_ENTRY_NO_ASYNC(void, OptoRuntime::register_finalizer(oopDesc* obj, JavaThread* thread)) 1581 assert(obj->is_oop(), "must be a valid oop"); 1582 assert(obj->klass()->has_finalizer(), "shouldn't be here otherwise"); 1583 InstanceKlass::register_finalizer(instanceOop(obj), CHECK); 1584 JRT_END 1585 1586 //----------------------------------------------------------------------------- 1587 1588 NamedCounter * volatile OptoRuntime::_named_counters = NULL; 1589 1590 // 1591 // dump the collected NamedCounters. 1592 // 1593 void OptoRuntime::print_named_counters() { 1594 int total_lock_count = 0; 1595 int eliminated_lock_count = 0; 1596 1597 NamedCounter* c = _named_counters; 1598 while (c) { |