Mercurial > hg > graal-compiler
comparison src/share/vm/opto/runtime.cpp @ 17810:62c54fcc0a35
Merge
author | kvn |
---|---|
date | Tue, 25 Mar 2014 17:07:36 -0700 |
parents | 752ba2e5f6d0 606acabe7b5c |
children | 03214612e77e |
comparison
equal
deleted
inserted
replaced
17809:a433eb716ce1 | 17810:62c54fcc0a35 |
---|---|
1309 BiasedLockingCounters* blc = ((BiasedLockingNamedCounter*)c)->counters(); | 1309 BiasedLockingCounters* blc = ((BiasedLockingNamedCounter*)c)->counters(); |
1310 if (blc->nonzero()) { | 1310 if (blc->nonzero()) { |
1311 tty->print_cr("%s", c->name()); | 1311 tty->print_cr("%s", c->name()); |
1312 blc->print_on(tty); | 1312 blc->print_on(tty); |
1313 } | 1313 } |
1314 #if INCLUDE_RTM_OPT | |
1315 } else if (c->tag() == NamedCounter::RTMLockingCounter) { | |
1316 RTMLockingCounters* rlc = ((RTMLockingNamedCounter*)c)->counters(); | |
1317 if (rlc->nonzero()) { | |
1318 tty->print_cr("%s", c->name()); | |
1319 rlc->print_on(tty); | |
1320 } | |
1321 #endif | |
1314 } | 1322 } |
1315 c = c->next(); | 1323 c = c->next(); |
1316 } | 1324 } |
1317 if (total_lock_count > 0) { | 1325 if (total_lock_count > 0) { |
1318 tty->print_cr("dynamic locks: %d", total_lock_count); | 1326 tty->print_cr("dynamic locks: %d", total_lock_count); |
1348 // To print linenumbers instead of bci use: m->line_number_from_bci(bci) | 1356 // To print linenumbers instead of bci use: m->line_number_from_bci(bci) |
1349 } | 1357 } |
1350 NamedCounter* c; | 1358 NamedCounter* c; |
1351 if (tag == NamedCounter::BiasedLockingCounter) { | 1359 if (tag == NamedCounter::BiasedLockingCounter) { |
1352 c = new BiasedLockingNamedCounter(strdup(st.as_string())); | 1360 c = new BiasedLockingNamedCounter(strdup(st.as_string())); |
1361 } else if (tag == NamedCounter::RTMLockingCounter) { | |
1362 c = new RTMLockingNamedCounter(strdup(st.as_string())); | |
1353 } else { | 1363 } else { |
1354 c = new NamedCounter(strdup(st.as_string()), tag); | 1364 c = new NamedCounter(strdup(st.as_string()), tag); |
1355 } | 1365 } |
1356 | 1366 |
1357 // atomically add the new counter to the head of the list. We only | 1367 // atomically add the new counter to the head of the list. We only |
1358 // add counters so this is safe. | 1368 // add counters so this is safe. |
1359 NamedCounter* head; | 1369 NamedCounter* head; |
1360 do { | 1370 do { |
1371 c->set_next(NULL); | |
1361 head = _named_counters; | 1372 head = _named_counters; |
1362 c->set_next(head); | 1373 c->set_next(head); |
1363 } while (Atomic::cmpxchg_ptr(c, &_named_counters, head) != head); | 1374 } while (Atomic::cmpxchg_ptr(c, &_named_counters, head) != head); |
1364 return c; | 1375 return c; |
1365 } | 1376 } |