< prev index next >

src/share/vm/opto/runtime.cpp

Print this page




1546 }
1547 
1548 const TypeFunc *OptoRuntime::dtrace_object_alloc_Type() {
1549   // create input type (domain)
1550   const Type **fields = TypeTuple::fields(2);
1551   fields[TypeFunc::Parms+0] = TypeRawPtr::BOTTOM; // Thread-local storage
1552   fields[TypeFunc::Parms+1] = TypeInstPtr::NOTNULL;  // oop;    newly allocated object
1553 
1554   const TypeTuple *domain = TypeTuple::make(TypeFunc::Parms+2,fields);
1555 
1556   // create result type (range)
1557   fields = TypeTuple::fields(0);
1558 
1559   const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+0,fields);
1560 
1561   return TypeFunc::make(domain,range);
1562 }
1563 
1564 
1565 JRT_ENTRY_NO_ASYNC(void, OptoRuntime::register_finalizer(oopDesc* obj, JavaThread* thread))
1566   assert(obj->is_oop(), "must be a valid oop");
1567   assert(obj->klass()->has_finalizer(), "shouldn't be here otherwise");
1568   InstanceKlass::register_finalizer(instanceOop(obj), CHECK);
1569 JRT_END
1570 
1571 //-----------------------------------------------------------------------------
1572 
1573 NamedCounter * volatile OptoRuntime::_named_counters = NULL;
1574 
1575 //
1576 // dump the collected NamedCounters.
1577 //
1578 void OptoRuntime::print_named_counters() {
1579   int total_lock_count = 0;
1580   int eliminated_lock_count = 0;
1581 
1582   NamedCounter* c = _named_counters;
1583   while (c) {
1584     if (c->tag() == NamedCounter::LockCounter || c->tag() == NamedCounter::EliminatedLockCounter) {
1585       int count = c->count();
1586       if (count > 0) {




1546 }
1547 
1548 const TypeFunc *OptoRuntime::dtrace_object_alloc_Type() {
1549   // create input type (domain)
1550   const Type **fields = TypeTuple::fields(2);
1551   fields[TypeFunc::Parms+0] = TypeRawPtr::BOTTOM; // Thread-local storage
1552   fields[TypeFunc::Parms+1] = TypeInstPtr::NOTNULL;  // oop;    newly allocated object
1553 
1554   const TypeTuple *domain = TypeTuple::make(TypeFunc::Parms+2,fields);
1555 
1556   // create result type (range)
1557   fields = TypeTuple::fields(0);
1558 
1559   const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+0,fields);
1560 
1561   return TypeFunc::make(domain,range);
1562 }
1563 
1564 
1565 JRT_ENTRY_NO_ASYNC(void, OptoRuntime::register_finalizer(oopDesc* obj, JavaThread* thread))
1566   assert(oopDesc::is_oop(obj), "must be a valid oop");
1567   assert(obj->klass()->has_finalizer(), "shouldn't be here otherwise");
1568   InstanceKlass::register_finalizer(instanceOop(obj), CHECK);
1569 JRT_END
1570 
1571 //-----------------------------------------------------------------------------
1572 
1573 NamedCounter * volatile OptoRuntime::_named_counters = NULL;
1574 
1575 //
1576 // dump the collected NamedCounters.
1577 //
1578 void OptoRuntime::print_named_counters() {
1579   int total_lock_count = 0;
1580   int eliminated_lock_count = 0;
1581 
1582   NamedCounter* c = _named_counters;
1583   while (c) {
1584     if (c->tag() == NamedCounter::LockCounter || c->tag() == NamedCounter::EliminatedLockCounter) {
1585       int count = c->count();
1586       if (count > 0) {


< prev index next >