changeset 13691:c2de45872d96

Merge
author lana
date Wed, 05 Sep 2012 12:00:30 -0700
parents 8be9ba21c4a9 319f583f66db
children 5b1ac23fe8a0 5c37d38d0aa8
files jdk/make/sun/beans/Makefile jdk/src/share/classes/java/lang/annotation/ContainerAnnotation.java jdk/src/share/classes/java/text/BreakDictionary.java jdk/src/share/classes/java/text/CollationRules.java jdk/src/share/classes/java/text/DictionaryBasedBreakIterator.java jdk/src/share/classes/java/text/RuleBasedBreakIterator.java jdk/src/share/classes/sun/beans/editors/BooleanEditor.java jdk/src/share/classes/sun/beans/editors/ByteEditor.java jdk/src/share/classes/sun/beans/editors/ColorEditor.java jdk/src/share/classes/sun/beans/editors/DoubleEditor.java jdk/src/share/classes/sun/beans/editors/EnumEditor.java jdk/src/share/classes/sun/beans/editors/FloatEditor.java jdk/src/share/classes/sun/beans/editors/FontEditor.java jdk/src/share/classes/sun/beans/editors/IntegerEditor.java jdk/src/share/classes/sun/beans/editors/LongEditor.java jdk/src/share/classes/sun/beans/editors/NumberEditor.java jdk/src/share/classes/sun/beans/editors/ShortEditor.java jdk/src/share/classes/sun/beans/editors/StringEditor.java jdk/src/share/classes/sun/beans/infos/ComponentBeanInfo.java jdk/src/share/classes/sun/text/resources/BreakIteratorInfo_th.java jdk/src/share/classes/sun/text/resources/BreakIteratorRules_th.java jdk/src/share/classes/sun/text/resources/CollationData_ar.java jdk/src/share/classes/sun/text/resources/CollationData_be.java jdk/src/share/classes/sun/text/resources/CollationData_bg.java jdk/src/share/classes/sun/text/resources/CollationData_ca.java jdk/src/share/classes/sun/text/resources/CollationData_cs.java jdk/src/share/classes/sun/text/resources/CollationData_da.java jdk/src/share/classes/sun/text/resources/CollationData_de.java jdk/src/share/classes/sun/text/resources/CollationData_el.java jdk/src/share/classes/sun/text/resources/CollationData_en.java jdk/src/share/classes/sun/text/resources/CollationData_es.java jdk/src/share/classes/sun/text/resources/CollationData_et.java jdk/src/share/classes/sun/text/resources/CollationData_fi.java jdk/src/share/classes/sun/text/resources/CollationData_fr.java jdk/src/share/classes/sun/text/resources/CollationData_hi.java jdk/src/share/classes/sun/text/resources/CollationData_hr.java jdk/src/share/classes/sun/text/resources/CollationData_hu.java jdk/src/share/classes/sun/text/resources/CollationData_is.java jdk/src/share/classes/sun/text/resources/CollationData_it.java jdk/src/share/classes/sun/text/resources/CollationData_iw.java jdk/src/share/classes/sun/text/resources/CollationData_ja.java jdk/src/share/classes/sun/text/resources/CollationData_ko.java jdk/src/share/classes/sun/text/resources/CollationData_lt.java jdk/src/share/classes/sun/text/resources/CollationData_lv.java jdk/src/share/classes/sun/text/resources/CollationData_mk.java jdk/src/share/classes/sun/text/resources/CollationData_nl.java jdk/src/share/classes/sun/text/resources/CollationData_no.java jdk/src/share/classes/sun/text/resources/CollationData_pl.java jdk/src/share/classes/sun/text/resources/CollationData_pt.java jdk/src/share/classes/sun/text/resources/CollationData_ro.java jdk/src/share/classes/sun/text/resources/CollationData_ru.java jdk/src/share/classes/sun/text/resources/CollationData_sk.java jdk/src/share/classes/sun/text/resources/CollationData_sl.java jdk/src/share/classes/sun/text/resources/CollationData_sq.java jdk/src/share/classes/sun/text/resources/CollationData_sr.java jdk/src/share/classes/sun/text/resources/CollationData_sr_Latn.java jdk/src/share/classes/sun/text/resources/CollationData_sv.java jdk/src/share/classes/sun/text/resources/CollationData_th.java jdk/src/share/classes/sun/text/resources/CollationData_tr.java jdk/src/share/classes/sun/text/resources/CollationData_uk.java jdk/src/share/classes/sun/text/resources/CollationData_vi.java jdk/src/share/classes/sun/text/resources/CollationData_zh.java jdk/src/share/classes/sun/text/resources/CollationData_zh_HK.java jdk/src/share/classes/sun/text/resources/CollationData_zh_TW.java jdk/src/share/classes/sun/text/resources/FormatData_ar.java jdk/src/share/classes/sun/text/resources/FormatData_ar_AE.java jdk/src/share/classes/sun/text/resources/FormatData_ar_BH.java jdk/src/share/classes/sun/text/resources/FormatData_ar_DZ.java jdk/src/share/classes/sun/text/resources/FormatData_ar_EG.java jdk/src/share/classes/sun/text/resources/FormatData_ar_IQ.java jdk/src/share/classes/sun/text/resources/FormatData_ar_JO.java jdk/src/share/classes/sun/text/resources/FormatData_ar_KW.java jdk/src/share/classes/sun/text/resources/FormatData_ar_LB.java jdk/src/share/classes/sun/text/resources/FormatData_ar_LY.java jdk/src/share/classes/sun/text/resources/FormatData_ar_MA.java jdk/src/share/classes/sun/text/resources/FormatData_ar_OM.java jdk/src/share/classes/sun/text/resources/FormatData_ar_QA.java jdk/src/share/classes/sun/text/resources/FormatData_ar_SA.java jdk/src/share/classes/sun/text/resources/FormatData_ar_SD.java jdk/src/share/classes/sun/text/resources/FormatData_ar_SY.java jdk/src/share/classes/sun/text/resources/FormatData_ar_TN.java jdk/src/share/classes/sun/text/resources/FormatData_ar_YE.java jdk/src/share/classes/sun/text/resources/FormatData_be.java jdk/src/share/classes/sun/text/resources/FormatData_be_BY.java jdk/src/share/classes/sun/text/resources/FormatData_bg.java jdk/src/share/classes/sun/text/resources/FormatData_bg_BG.java jdk/src/share/classes/sun/text/resources/FormatData_ca.java jdk/src/share/classes/sun/text/resources/FormatData_ca_ES.java jdk/src/share/classes/sun/text/resources/FormatData_cs.java jdk/src/share/classes/sun/text/resources/FormatData_cs_CZ.java jdk/src/share/classes/sun/text/resources/FormatData_da.java jdk/src/share/classes/sun/text/resources/FormatData_da_DK.java jdk/src/share/classes/sun/text/resources/FormatData_de.java jdk/src/share/classes/sun/text/resources/FormatData_de_AT.java jdk/src/share/classes/sun/text/resources/FormatData_de_CH.java jdk/src/share/classes/sun/text/resources/FormatData_de_DE.java jdk/src/share/classes/sun/text/resources/FormatData_de_LU.java jdk/src/share/classes/sun/text/resources/FormatData_el.java jdk/src/share/classes/sun/text/resources/FormatData_el_CY.java jdk/src/share/classes/sun/text/resources/FormatData_el_GR.java jdk/src/share/classes/sun/text/resources/FormatData_en.java jdk/src/share/classes/sun/text/resources/FormatData_en_AU.java jdk/src/share/classes/sun/text/resources/FormatData_en_CA.java jdk/src/share/classes/sun/text/resources/FormatData_en_GB.java jdk/src/share/classes/sun/text/resources/FormatData_en_IE.java jdk/src/share/classes/sun/text/resources/FormatData_en_IN.java jdk/src/share/classes/sun/text/resources/FormatData_en_MT.java jdk/src/share/classes/sun/text/resources/FormatData_en_NZ.java jdk/src/share/classes/sun/text/resources/FormatData_en_PH.java jdk/src/share/classes/sun/text/resources/FormatData_en_SG.java jdk/src/share/classes/sun/text/resources/FormatData_en_US.java jdk/src/share/classes/sun/text/resources/FormatData_en_ZA.java jdk/src/share/classes/sun/text/resources/FormatData_es.java jdk/src/share/classes/sun/text/resources/FormatData_es_AR.java jdk/src/share/classes/sun/text/resources/FormatData_es_BO.java jdk/src/share/classes/sun/text/resources/FormatData_es_CL.java jdk/src/share/classes/sun/text/resources/FormatData_es_CO.java jdk/src/share/classes/sun/text/resources/FormatData_es_CR.java jdk/src/share/classes/sun/text/resources/FormatData_es_DO.java jdk/src/share/classes/sun/text/resources/FormatData_es_EC.java jdk/src/share/classes/sun/text/resources/FormatData_es_ES.java jdk/src/share/classes/sun/text/resources/FormatData_es_GT.java jdk/src/share/classes/sun/text/resources/FormatData_es_HN.java jdk/src/share/classes/sun/text/resources/FormatData_es_MX.java jdk/src/share/classes/sun/text/resources/FormatData_es_NI.java jdk/src/share/classes/sun/text/resources/FormatData_es_PA.java jdk/src/share/classes/sun/text/resources/FormatData_es_PE.java jdk/src/share/classes/sun/text/resources/FormatData_es_PR.java jdk/src/share/classes/sun/text/resources/FormatData_es_PY.java jdk/src/share/classes/sun/text/resources/FormatData_es_SV.java jdk/src/share/classes/sun/text/resources/FormatData_es_US.java jdk/src/share/classes/sun/text/resources/FormatData_es_UY.java jdk/src/share/classes/sun/text/resources/FormatData_es_VE.java jdk/src/share/classes/sun/text/resources/FormatData_et.java jdk/src/share/classes/sun/text/resources/FormatData_et_EE.java jdk/src/share/classes/sun/text/resources/FormatData_fi.java jdk/src/share/classes/sun/text/resources/FormatData_fi_FI.java jdk/src/share/classes/sun/text/resources/FormatData_fr.java jdk/src/share/classes/sun/text/resources/FormatData_fr_BE.java jdk/src/share/classes/sun/text/resources/FormatData_fr_CA.java jdk/src/share/classes/sun/text/resources/FormatData_fr_CH.java jdk/src/share/classes/sun/text/resources/FormatData_fr_FR.java jdk/src/share/classes/sun/text/resources/FormatData_fr_LU.java jdk/src/share/classes/sun/text/resources/FormatData_ga.java jdk/src/share/classes/sun/text/resources/FormatData_ga_IE.java jdk/src/share/classes/sun/text/resources/FormatData_hi_IN.java jdk/src/share/classes/sun/text/resources/FormatData_hr.java jdk/src/share/classes/sun/text/resources/FormatData_hr_HR.java jdk/src/share/classes/sun/text/resources/FormatData_hu.java jdk/src/share/classes/sun/text/resources/FormatData_hu_HU.java jdk/src/share/classes/sun/text/resources/FormatData_in.java jdk/src/share/classes/sun/text/resources/FormatData_in_ID.java jdk/src/share/classes/sun/text/resources/FormatData_is.java jdk/src/share/classes/sun/text/resources/FormatData_is_IS.java jdk/src/share/classes/sun/text/resources/FormatData_it.java jdk/src/share/classes/sun/text/resources/FormatData_it_CH.java jdk/src/share/classes/sun/text/resources/FormatData_it_IT.java jdk/src/share/classes/sun/text/resources/FormatData_iw.java jdk/src/share/classes/sun/text/resources/FormatData_iw_IL.java jdk/src/share/classes/sun/text/resources/FormatData_ja.java jdk/src/share/classes/sun/text/resources/FormatData_ja_JP.java jdk/src/share/classes/sun/text/resources/FormatData_ja_JP_JP.java jdk/src/share/classes/sun/text/resources/FormatData_ko.java jdk/src/share/classes/sun/text/resources/FormatData_ko_KR.java jdk/src/share/classes/sun/text/resources/FormatData_lt.java jdk/src/share/classes/sun/text/resources/FormatData_lt_LT.java jdk/src/share/classes/sun/text/resources/FormatData_lv.java jdk/src/share/classes/sun/text/resources/FormatData_lv_LV.java jdk/src/share/classes/sun/text/resources/FormatData_mk.java jdk/src/share/classes/sun/text/resources/FormatData_mk_MK.java jdk/src/share/classes/sun/text/resources/FormatData_ms.java jdk/src/share/classes/sun/text/resources/FormatData_ms_MY.java jdk/src/share/classes/sun/text/resources/FormatData_mt.java jdk/src/share/classes/sun/text/resources/FormatData_mt_MT.java jdk/src/share/classes/sun/text/resources/FormatData_nl.java jdk/src/share/classes/sun/text/resources/FormatData_nl_BE.java jdk/src/share/classes/sun/text/resources/FormatData_nl_NL.java jdk/src/share/classes/sun/text/resources/FormatData_no.java jdk/src/share/classes/sun/text/resources/FormatData_no_NO.java jdk/src/share/classes/sun/text/resources/FormatData_no_NO_NY.java jdk/src/share/classes/sun/text/resources/FormatData_pl.java jdk/src/share/classes/sun/text/resources/FormatData_pl_PL.java jdk/src/share/classes/sun/text/resources/FormatData_pt.java jdk/src/share/classes/sun/text/resources/FormatData_pt_BR.java jdk/src/share/classes/sun/text/resources/FormatData_pt_PT.java jdk/src/share/classes/sun/text/resources/FormatData_ro.java jdk/src/share/classes/sun/text/resources/FormatData_ro_RO.java jdk/src/share/classes/sun/text/resources/FormatData_ru.java jdk/src/share/classes/sun/text/resources/FormatData_ru_RU.java jdk/src/share/classes/sun/text/resources/FormatData_sk.java jdk/src/share/classes/sun/text/resources/FormatData_sk_SK.java jdk/src/share/classes/sun/text/resources/FormatData_sl.java jdk/src/share/classes/sun/text/resources/FormatData_sl_SI.java jdk/src/share/classes/sun/text/resources/FormatData_sq.java jdk/src/share/classes/sun/text/resources/FormatData_sq_AL.java jdk/src/share/classes/sun/text/resources/FormatData_sr.java jdk/src/share/classes/sun/text/resources/FormatData_sr_BA.java jdk/src/share/classes/sun/text/resources/FormatData_sr_CS.java jdk/src/share/classes/sun/text/resources/FormatData_sr_Latn.java jdk/src/share/classes/sun/text/resources/FormatData_sr_Latn_BA.java jdk/src/share/classes/sun/text/resources/FormatData_sr_Latn_ME.java jdk/src/share/classes/sun/text/resources/FormatData_sr_Latn_RS.java jdk/src/share/classes/sun/text/resources/FormatData_sr_ME.java jdk/src/share/classes/sun/text/resources/FormatData_sr_RS.java jdk/src/share/classes/sun/text/resources/FormatData_sv.java jdk/src/share/classes/sun/text/resources/FormatData_sv_SE.java jdk/src/share/classes/sun/text/resources/FormatData_th.java jdk/src/share/classes/sun/text/resources/FormatData_th_TH.java jdk/src/share/classes/sun/text/resources/FormatData_th_TH_TH.java jdk/src/share/classes/sun/text/resources/FormatData_tr.java jdk/src/share/classes/sun/text/resources/FormatData_tr_TR.java jdk/src/share/classes/sun/text/resources/FormatData_uk.java jdk/src/share/classes/sun/text/resources/FormatData_uk_UA.java jdk/src/share/classes/sun/text/resources/FormatData_vi.java jdk/src/share/classes/sun/text/resources/FormatData_vi_VN.java jdk/src/share/classes/sun/text/resources/FormatData_zh.java jdk/src/share/classes/sun/text/resources/FormatData_zh_CN.java jdk/src/share/classes/sun/text/resources/FormatData_zh_HK.java jdk/src/share/classes/sun/text/resources/FormatData_zh_SG.java jdk/src/share/classes/sun/text/resources/FormatData_zh_TW.java jdk/src/share/classes/sun/text/resources/thai_dict jdk/src/share/classes/sun/util/EmptyListResourceBundle.java jdk/src/share/classes/sun/util/LocaleDataMetaInfo-XLocales.java.template jdk/src/share/classes/sun/util/LocaleServiceProviderPool.java jdk/src/share/classes/sun/util/TimeZoneNameUtility.java jdk/src/share/classes/sun/util/resources/CalendarData_ar.properties jdk/src/share/classes/sun/util/resources/CalendarData_be.properties jdk/src/share/classes/sun/util/resources/CalendarData_bg.properties jdk/src/share/classes/sun/util/resources/CalendarData_ca.properties jdk/src/share/classes/sun/util/resources/CalendarData_cs.properties jdk/src/share/classes/sun/util/resources/CalendarData_da.properties jdk/src/share/classes/sun/util/resources/CalendarData_de.properties jdk/src/share/classes/sun/util/resources/CalendarData_el.properties jdk/src/share/classes/sun/util/resources/CalendarData_el_CY.properties jdk/src/share/classes/sun/util/resources/CalendarData_en.properties jdk/src/share/classes/sun/util/resources/CalendarData_en_GB.properties jdk/src/share/classes/sun/util/resources/CalendarData_en_IE.properties jdk/src/share/classes/sun/util/resources/CalendarData_en_MT.properties jdk/src/share/classes/sun/util/resources/CalendarData_es.properties jdk/src/share/classes/sun/util/resources/CalendarData_es_ES.properties jdk/src/share/classes/sun/util/resources/CalendarData_es_US.properties jdk/src/share/classes/sun/util/resources/CalendarData_et.properties jdk/src/share/classes/sun/util/resources/CalendarData_fi.properties jdk/src/share/classes/sun/util/resources/CalendarData_fr.properties jdk/src/share/classes/sun/util/resources/CalendarData_fr_CA.properties jdk/src/share/classes/sun/util/resources/CalendarData_hi.properties jdk/src/share/classes/sun/util/resources/CalendarData_hr.properties jdk/src/share/classes/sun/util/resources/CalendarData_hu.properties jdk/src/share/classes/sun/util/resources/CalendarData_in_ID.properties jdk/src/share/classes/sun/util/resources/CalendarData_is.properties jdk/src/share/classes/sun/util/resources/CalendarData_it.properties jdk/src/share/classes/sun/util/resources/CalendarData_iw.properties jdk/src/share/classes/sun/util/resources/CalendarData_ja.properties jdk/src/share/classes/sun/util/resources/CalendarData_ko.properties jdk/src/share/classes/sun/util/resources/CalendarData_lt.properties jdk/src/share/classes/sun/util/resources/CalendarData_lv.properties jdk/src/share/classes/sun/util/resources/CalendarData_mk.properties jdk/src/share/classes/sun/util/resources/CalendarData_ms_MY.properties jdk/src/share/classes/sun/util/resources/CalendarData_mt.properties jdk/src/share/classes/sun/util/resources/CalendarData_mt_MT.properties jdk/src/share/classes/sun/util/resources/CalendarData_nl.properties jdk/src/share/classes/sun/util/resources/CalendarData_no.properties jdk/src/share/classes/sun/util/resources/CalendarData_pl.properties jdk/src/share/classes/sun/util/resources/CalendarData_pt.properties jdk/src/share/classes/sun/util/resources/CalendarData_pt_PT.properties jdk/src/share/classes/sun/util/resources/CalendarData_ro.properties jdk/src/share/classes/sun/util/resources/CalendarData_ru.properties jdk/src/share/classes/sun/util/resources/CalendarData_sk.properties jdk/src/share/classes/sun/util/resources/CalendarData_sl.properties jdk/src/share/classes/sun/util/resources/CalendarData_sq.properties jdk/src/share/classes/sun/util/resources/CalendarData_sr.properties jdk/src/share/classes/sun/util/resources/CalendarData_sr_Latn_BA.properties jdk/src/share/classes/sun/util/resources/CalendarData_sr_Latn_ME.properties jdk/src/share/classes/sun/util/resources/CalendarData_sr_Latn_RS.properties jdk/src/share/classes/sun/util/resources/CalendarData_sv.properties jdk/src/share/classes/sun/util/resources/CalendarData_th.properties jdk/src/share/classes/sun/util/resources/CalendarData_tr.properties jdk/src/share/classes/sun/util/resources/CalendarData_uk.properties jdk/src/share/classes/sun/util/resources/CalendarData_vi.properties jdk/src/share/classes/sun/util/resources/CalendarData_zh.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_ar_AE.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_ar_BH.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_ar_DZ.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_ar_EG.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_ar_IQ.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_ar_JO.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_ar_KW.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_ar_LB.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_ar_LY.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_ar_MA.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_ar_OM.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_ar_QA.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_ar_SA.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_ar_SD.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_ar_SY.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_ar_TN.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_ar_YE.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_be_BY.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_bg_BG.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_ca_ES.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_cs_CZ.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_da_DK.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_de.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_de_AT.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_de_CH.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_de_DE.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_de_GR.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_de_LU.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_el_CY.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_el_GR.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_en_AU.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_en_CA.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_en_GB.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_en_IE.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_en_IN.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_en_MT.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_en_NZ.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_en_PH.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_en_SG.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_en_US.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_en_ZA.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_es.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_es_AR.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_es_BO.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_es_CL.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_es_CO.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_es_CR.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_es_CU.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_es_DO.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_es_EC.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_es_ES.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_es_GT.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_es_HN.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_es_MX.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_es_NI.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_es_PA.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_es_PE.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_es_PR.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_es_PY.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_es_SV.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_es_US.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_es_UY.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_es_VE.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_et_EE.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_fi_FI.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_fr.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_fr_BE.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_fr_CA.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_fr_CH.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_fr_FR.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_fr_LU.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_ga_IE.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_hi_IN.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_hr_HR.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_hu_HU.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_in_ID.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_is_IS.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_it.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_it_CH.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_it_IT.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_iw_IL.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_ja.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_ja_JP.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_ko.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_ko_KR.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_lt_LT.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_lv_LV.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_mk_MK.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_ms_MY.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_mt_MT.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_nl_BE.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_nl_NL.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_no_NO.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_pl_PL.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_pt.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_pt_BR.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_pt_PT.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_ro_RO.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_ru_RU.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_sk_SK.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_sl_SI.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_sq_AL.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_sr_BA.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_sr_CS.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_sr_Latn_BA.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_sr_Latn_ME.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_sr_Latn_RS.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_sr_ME.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_sr_RS.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_sv.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_sv_SE.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_th_TH.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_tr_TR.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_uk_UA.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_vi_VN.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_zh_CN.properties jdk/src/share/classes/sun/util/resources/CurrencyNames_zh_HK.java jdk/src/share/classes/sun/util/resources/CurrencyNames_zh_SG.java jdk/src/share/classes/sun/util/resources/CurrencyNames_zh_TW.properties jdk/src/share/classes/sun/util/resources/LocaleNames_ar.properties jdk/src/share/classes/sun/util/resources/LocaleNames_be.properties jdk/src/share/classes/sun/util/resources/LocaleNames_bg.properties jdk/src/share/classes/sun/util/resources/LocaleNames_ca.properties jdk/src/share/classes/sun/util/resources/LocaleNames_cs.properties jdk/src/share/classes/sun/util/resources/LocaleNames_da.properties jdk/src/share/classes/sun/util/resources/LocaleNames_de.properties jdk/src/share/classes/sun/util/resources/LocaleNames_el.properties jdk/src/share/classes/sun/util/resources/LocaleNames_el_CY.properties jdk/src/share/classes/sun/util/resources/LocaleNames_en.properties jdk/src/share/classes/sun/util/resources/LocaleNames_en_MT.properties jdk/src/share/classes/sun/util/resources/LocaleNames_en_PH.properties jdk/src/share/classes/sun/util/resources/LocaleNames_en_SG.properties jdk/src/share/classes/sun/util/resources/LocaleNames_es.properties jdk/src/share/classes/sun/util/resources/LocaleNames_es_US.properties jdk/src/share/classes/sun/util/resources/LocaleNames_et.properties jdk/src/share/classes/sun/util/resources/LocaleNames_fi.properties jdk/src/share/classes/sun/util/resources/LocaleNames_fr.properties jdk/src/share/classes/sun/util/resources/LocaleNames_ga.properties jdk/src/share/classes/sun/util/resources/LocaleNames_hi.properties jdk/src/share/classes/sun/util/resources/LocaleNames_hr.properties jdk/src/share/classes/sun/util/resources/LocaleNames_hu.properties jdk/src/share/classes/sun/util/resources/LocaleNames_in.properties jdk/src/share/classes/sun/util/resources/LocaleNames_is.properties jdk/src/share/classes/sun/util/resources/LocaleNames_it.properties jdk/src/share/classes/sun/util/resources/LocaleNames_iw.properties jdk/src/share/classes/sun/util/resources/LocaleNames_ja.properties jdk/src/share/classes/sun/util/resources/LocaleNames_ko.properties jdk/src/share/classes/sun/util/resources/LocaleNames_lt.properties jdk/src/share/classes/sun/util/resources/LocaleNames_lv.properties jdk/src/share/classes/sun/util/resources/LocaleNames_mk.properties jdk/src/share/classes/sun/util/resources/LocaleNames_ms.properties jdk/src/share/classes/sun/util/resources/LocaleNames_mt.properties jdk/src/share/classes/sun/util/resources/LocaleNames_nl.properties jdk/src/share/classes/sun/util/resources/LocaleNames_no.properties jdk/src/share/classes/sun/util/resources/LocaleNames_no_NO_NY.properties jdk/src/share/classes/sun/util/resources/LocaleNames_pl.properties jdk/src/share/classes/sun/util/resources/LocaleNames_pt.properties jdk/src/share/classes/sun/util/resources/LocaleNames_pt_BR.properties jdk/src/share/classes/sun/util/resources/LocaleNames_pt_PT.properties jdk/src/share/classes/sun/util/resources/LocaleNames_ro.properties jdk/src/share/classes/sun/util/resources/LocaleNames_ru.properties jdk/src/share/classes/sun/util/resources/LocaleNames_sk.properties jdk/src/share/classes/sun/util/resources/LocaleNames_sl.properties jdk/src/share/classes/sun/util/resources/LocaleNames_sq.properties jdk/src/share/classes/sun/util/resources/LocaleNames_sr.properties jdk/src/share/classes/sun/util/resources/LocaleNames_sr_Latn.properties jdk/src/share/classes/sun/util/resources/LocaleNames_sv.properties jdk/src/share/classes/sun/util/resources/LocaleNames_th.properties jdk/src/share/classes/sun/util/resources/LocaleNames_tr.properties jdk/src/share/classes/sun/util/resources/LocaleNames_uk.properties jdk/src/share/classes/sun/util/resources/LocaleNames_vi.properties jdk/src/share/classes/sun/util/resources/LocaleNames_zh.properties jdk/src/share/classes/sun/util/resources/LocaleNames_zh_HK.java jdk/src/share/classes/sun/util/resources/LocaleNames_zh_SG.properties jdk/src/share/classes/sun/util/resources/LocaleNames_zh_TW.properties jdk/src/share/classes/sun/util/resources/TimeZoneNames_de.java jdk/src/share/classes/sun/util/resources/TimeZoneNames_en.java jdk/src/share/classes/sun/util/resources/TimeZoneNames_en_CA.java jdk/src/share/classes/sun/util/resources/TimeZoneNames_en_GB.java jdk/src/share/classes/sun/util/resources/TimeZoneNames_en_IE.java jdk/src/share/classes/sun/util/resources/TimeZoneNames_es.java jdk/src/share/classes/sun/util/resources/TimeZoneNames_fr.java jdk/src/share/classes/sun/util/resources/TimeZoneNames_hi.java jdk/src/share/classes/sun/util/resources/TimeZoneNames_it.java jdk/src/share/classes/sun/util/resources/TimeZoneNames_ja.java jdk/src/share/classes/sun/util/resources/TimeZoneNames_ko.java jdk/src/share/classes/sun/util/resources/TimeZoneNames_pt_BR.java jdk/src/share/classes/sun/util/resources/TimeZoneNames_sv.java jdk/src/share/classes/sun/util/resources/TimeZoneNames_zh_CN.java jdk/src/share/classes/sun/util/resources/TimeZoneNames_zh_HK.java jdk/src/share/classes/sun/util/resources/TimeZoneNames_zh_TW.java jdk/src/solaris/classes/sun/awt/X11/XTextTransferHelper.java jdk/test/java/lang/invoke/MaxTest.java jdk/test/javax/swing/JColorChooser/Test4380468.html jdk/test/javax/swing/JColorChooser/Test4380468.java
diffstat 1899 files changed, 470203 insertions(+), 69813 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Wed Sep 05 08:32:32 2012 -0700
+++ b/.hgtags	Wed Sep 05 12:00:30 2012 -0700
@@ -175,3 +175,4 @@
 382651d28f2502d371eca751962232c0e535e57a jdk8-b51
 b67041a6cb508da18d2f5c7687e6a31e08bea4fc jdk8-b52
 c7aa5cca1c01689a7b1a92411daf83684af05a33 jdk8-b53
+7c6aa31ff1b2ae48c1c686ebe1aadf0c3da5be15 jdk8-b54
--- a/.hgtags-top-repo	Wed Sep 05 08:32:32 2012 -0700
+++ b/.hgtags-top-repo	Wed Sep 05 12:00:30 2012 -0700
@@ -175,3 +175,4 @@
 57c0aee7309050b9d6cfcbd202dc704e9260b377 jdk8-b51
 8d24def5ceb3b8f2e857f2e18b2804fc59eecf8d jdk8-b52
 febd7ff5280067ca482faaeb9418ae88764c1a35 jdk8-b53
+c1a277c6022affbc6855bdfb039511e73fbe2395 jdk8-b54
--- a/corba/.hgtags	Wed Sep 05 08:32:32 2012 -0700
+++ b/corba/.hgtags	Wed Sep 05 12:00:30 2012 -0700
@@ -175,3 +175,4 @@
 9b0f841ca9f7ee9bacf16a5ab41c4f829276bc6b jdk8-b51
 80689ff9cb499837513f18a1136dac7f0686cd55 jdk8-b52
 63aeb7a2472fb299134ad7388e0a111a5340b02d jdk8-b53
+16c82fc74695bab9b9e0fb05c086a5a08ba0082f jdk8-b54
--- a/corba/src/share/classes/com/sun/corba/se/impl/transport/CorbaResponseWaitingRoomImpl.java	Wed Sep 05 08:32:32 2012 -0700
+++ b/corba/src/share/classes/com/sun/corba/se/impl/transport/CorbaResponseWaitingRoomImpl.java	Wed Sep 05 12:00:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,10 @@
 
 package com.sun.corba.se.impl.transport;
 
-import java.util.Hashtable;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
 
 import org.omg.CORBA.CompletionStatus;
 import org.omg.CORBA.SystemException;
@@ -68,7 +71,7 @@
 
     private CorbaConnection connection;
     // Maps requestId to an OutCallDesc.
-    private Hashtable out_calls = null; // REVISIT - use int hastable/map
+    final private Map<Integer, OutCallDesc> out_calls;
 
     public CorbaResponseWaitingRoomImpl(ORB orb, CorbaConnection connection)
     {
@@ -76,7 +79,8 @@
         wrapper = ORBUtilSystemException.get( orb,
             CORBALogDomains.RPC_TRANSPORT ) ;
         this.connection = connection;
-        out_calls = new Hashtable();
+        out_calls =
+            Collections.synchronizedMap(new HashMap<Integer, OutCallDesc>());
     }
 
     ////////////////////////////////////////////////////
@@ -139,7 +143,7 @@
             return null;
         }
 
-        OutCallDesc call = (OutCallDesc)out_calls.get(requestId);
+        OutCallDesc call = out_calls.get(requestId);
         if (call == null) {
             throw wrapper.nullOutCall(CompletionStatus.COMPLETED_MAYBE);
         }
@@ -197,7 +201,7 @@
         LocateReplyOrReplyMessage header = (LocateReplyOrReplyMessage)
             inputObject.getMessageHeader();
         Integer requestId = new Integer(header.getRequestId());
-        OutCallDesc call = (OutCallDesc) out_calls.get(requestId);
+        OutCallDesc call = out_calls.get(requestId);
 
         if (orb.transportDebugFlag) {
             dprint(".responseReceived: id/"
@@ -248,7 +252,6 @@
 
     public int numberRegistered()
     {
-        // Note: Hashtable.size() is not synchronized
         return out_calls.size();
     }
 
@@ -264,29 +267,41 @@
             dprint(".signalExceptionToAllWaiters: " + systemException);
         }
 
-        OutCallDesc call;
-        java.util.Enumeration e = out_calls.elements();
-        while(e.hasMoreElements()) {
-            call = (OutCallDesc) e.nextElement();
+        synchronized (out_calls) {
+            if (orb.transportDebugFlag) {
+                dprint(".signalExceptionToAllWaiters: out_calls size :" +
+                       out_calls.size());
+            }
 
-            synchronized(call.done){
-                // anything waiting for BufferManagerRead's fragment queue
-                // needs to be cancelled
-                CorbaMessageMediator corbaMsgMediator =
-                             (CorbaMessageMediator)call.messageMediator;
-                CDRInputObject inputObject =
-                           (CDRInputObject)corbaMsgMediator.getInputObject();
-                // IMPORTANT: If inputObject is null, then no need to tell
-                //            BufferManagerRead to cancel request processing.
-                if (inputObject != null) {
-                    BufferManagerReadStream bufferManager =
-                        (BufferManagerReadStream)inputObject.getBufferManager();
-                    int requestId = corbaMsgMediator.getRequestId();
-                    bufferManager.cancelProcessing(requestId);
+            for (OutCallDesc call : out_calls.values()) {
+                if (orb.transportDebugFlag) {
+                    dprint(".signalExceptionToAllWaiters: signaling " +
+                            call);
                 }
-                call.inputObject = null;
-                call.exception = systemException;
-                call.done.notify();
+                synchronized(call.done) {
+                    try {
+                        // anything waiting for BufferManagerRead's fragment queue
+                        // needs to be cancelled
+                        CorbaMessageMediator corbaMsgMediator =
+                                     (CorbaMessageMediator)call.messageMediator;
+                        CDRInputObject inputObject =
+                                   (CDRInputObject)corbaMsgMediator.getInputObject();
+                        // IMPORTANT: If inputObject is null, then no need to tell
+                        //            BufferManagerRead to cancel request processing.
+                        if (inputObject != null) {
+                            BufferManagerReadStream bufferManager =
+                                (BufferManagerReadStream)inputObject.getBufferManager();
+                            int requestId = corbaMsgMediator.getRequestId();
+                            bufferManager.cancelProcessing(requestId);
+                        }
+                    } catch (Exception e) {
+                    } finally {
+                        // attempt to wake up waiting threads in all cases
+                        call.inputObject = null;
+                        call.exception = systemException;
+                        call.done.notifyAll();
+                    }
+                }
             }
         }
     }
@@ -294,7 +309,7 @@
     public MessageMediator getMessageMediator(int requestId)
     {
         Integer id = new Integer(requestId);
-        OutCallDesc call = (OutCallDesc) out_calls.get(id);
+        OutCallDesc call = out_calls.get(id);
         if (call == null) {
             // This can happen when getting early reply fragments for a
             // request which has completed (e.g., client marshaling error).
--- a/corba/src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelConnectionImpl.java	Wed Sep 05 08:32:32 2012 -0700
+++ b/corba/src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelConnectionImpl.java	Wed Sep 05 12:00:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1521,7 +1521,7 @@
             // connection and give them the SystemException;
 
             responseWaitingRoom.signalExceptionToAllWaiters(systemException);
-
+        } finally {
             if (contactInfo != null) {
                 ((OutboundConnectionCache)getConnectionCache()).remove(contactInfo);
             } else if (acceptor != null) {
@@ -1542,7 +1542,6 @@
 
             writeUnlock();
 
-        } finally {
             if (orb.transportDebugFlag) {
                 dprint(".purgeCalls<-: "
                        + minor_code + "/" + die + "/" + lockHeld
--- a/hotspot/.hgtags	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/.hgtags	Wed Sep 05 12:00:30 2012 -0700
@@ -272,3 +272,5 @@
 6d0436885201db3f581523344a734793bb989549 jdk8-b52
 54240c1b8e87758f28da2c6a569a926fd9e0910a jdk8-b53
 9e3ae661284dc04185b029d85440fe7811f1ed07 hs24-b21
+e8fb566b94667f88462164defa654203f0ab6820 jdk8-b54
+09ea7e0752b306b8ae74713aeb4eb6263e1c6836 hs24-b22
--- a/hotspot/agent/make/saenv.sh	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/agent/make/saenv.sh	Wed Sep 05 12:00:30 2012 -0700
@@ -26,7 +26,7 @@
 # This file sets common environment variables for all SA scripts
 
 OS=`uname`
-STARTDIR=`dirname $0`
+STARTDIR=`(cd \`dirname $0 \`; pwd)`
 ARCH=`uname -m`
 
 if [ "x$SA_JAVA" = "x" ]; then
--- a/hotspot/agent/make/start-debug-server-proc.sh	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/agent/make/start-debug-server-proc.sh	Wed Sep 05 12:00:30 2012 -0700
@@ -25,10 +25,11 @@
 
 . `dirname $0`/saenv.sh
 
-if [ -f $STARTDIR/sa.jar ] ; then
-  CP=$STARTDIR/sa.jar
+if [ -f $STARTDIR/../lib/sa-jdi.jar ] ; then
+  CP=$STARTDIR/../lib/sa-jdi.jar
 else
   CP=$STARTDIR/../build/classes
 fi
 
-$SA_JAVA -classpath $CP ${OPTIONS} -Djava.rmi.server.codebase=file:/$CP -Djava.security.policy=$STARTDIR\/grantAll.policy sun.jvm.hotspot.DebugServer $*
+$STARTDIR/java -classpath $CP ${OPTIONS} -Djava.rmi.server.codebase=file://$CP -Djava.security.policy=${STARTDIR}/grantAll.policy sun.jvm.hotspot.DebugServer $*
+
--- a/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c	Wed Sep 05 12:00:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -55,11 +55,11 @@
 #define THROW_NEW_DEBUGGER_EXCEPTION_(str, value) { throw_new_debugger_exception(env, str); return value; }
 #define THROW_NEW_DEBUGGER_EXCEPTION(str) { throw_new_debugger_exception(env, str); return;}
 
-static void throw_new_debugger_exception(JNIEnv* env, const char* errMsg) {
+void throw_new_debugger_exception(JNIEnv* env, const char* errMsg) {
   (*env)->ThrowNew(env, (*env)->FindClass(env, "sun/jvm/hotspot/debugger/DebuggerException"), errMsg);
 }
 
-static struct ps_prochandle* get_proc_handle(JNIEnv* env, jobject this_obj) {
+struct ps_prochandle* get_proc_handle(JNIEnv* env, jobject this_obj) {
   jlong ptr = (*env)->GetLongField(env, this_obj, p_ps_prochandle_ID);
   return (struct ps_prochandle*)(intptr_t)ptr;
 }
@@ -280,6 +280,7 @@
   return (err == PS_OK)? array : 0;
 }
 
+#if defined(i386) || defined(ia64) || defined(amd64) || defined(sparc) || defined(sparcv9)
 JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_getThreadIntegerRegisterSet0
   (JNIEnv *env, jobject this_obj, jint lwp_id) {
 
@@ -410,3 +411,4 @@
   (*env)->ReleaseLongArrayElements(env, array, regs, JNI_COMMIT);
   return array;
 }
+#endif
--- a/hotspot/agent/src/os/linux/libproc.h	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/agent/src/os/linux/libproc.h	Wed Sep 05 12:00:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,10 +25,15 @@
 #ifndef _LIBPROC_H_
 #define _LIBPROC_H_
 
+#include <jni.h>
 #include <unistd.h>
 #include <stdint.h>
 #include "proc_service.h"
 
+#if defined(arm) || defined(ppc)
+#include "libproc_md.h"
+#endif
+
 #if defined(sparc) || defined(sparcv9)
 /*
   If _LP64 is defined ptrace.h should be taken from /usr/include/asm-sparc64
@@ -139,4 +144,8 @@
 // address->nearest symbol lookup. return NULL for no symbol
 const char* symbol_for_pc(struct ps_prochandle* ph, uintptr_t addr, uintptr_t* poffset);
 
+struct ps_prochandle* get_proc_handle(JNIEnv* env, jobject this_obj);
+
+void throw_new_debugger_exception(JNIEnv* env, const char* errMsg);
+
 #endif //__LIBPROC_H_
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java	Wed Sep 05 12:00:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -549,7 +549,13 @@
                     machDesc = new MachineDescriptionSPARC32Bit();
             }
         } else {
-            throw new DebuggerException("Linux only supported on x86/ia64/amd64/sparc/sparc64");
+          try {
+            machDesc = (MachineDescription)
+              Class.forName("sun.jvm.hotspot.debugger.MachineDescription" +
+                            cpu.toUpperCase()).newInstance();
+          } catch (Exception e) {
+            throw new DebuggerException("Linux not supported on machine type " + cpu);
+          }
         }
 
         LinuxDebuggerLocal dbg =
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/bugspot/BugSpotAgent.java	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/bugspot/BugSpotAgent.java	Wed Sep 05 12:00:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -737,9 +737,16 @@
                machDesc = new MachineDescriptionSPARC32Bit();
             }
         } else {
-            throw new DebuggerException("Linux only supported on x86/ia64/amd64/sparc/sparc64");
+          try {
+            machDesc = (MachineDescription)
+              Class.forName("sun.jvm.hotspot.debugger.MachineDescription" +
+              cpu.toUpperCase()).newInstance();
+          } catch (Exception e) {
+            throw new DebuggerException("unsupported machine type");
+          }
         }
 
+
         // Note we do not use a cache for the local debugger in server
         // mode; it will be taken care of on the client side (once remote
         // debugging is implemented).
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/ThreadContext.java	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/ThreadContext.java	Wed Sep 05 12:00:30 2012 -0700
@@ -24,6 +24,8 @@
 
 package sun.jvm.hotspot.debugger;
 
+import sun.jvm.hotspot.debugger.cdbg.*;
+
 /** This is a placeholder interface for a thread's context, containing
     only integer registers (no floating-point ones). What it contains
     is platform-dependent. Not all registers are guaranteed to be
@@ -54,4 +56,6 @@
   /** Set the value of the specified register (0..getNumRegisters() -
       1) as an Address */
   public void setRegisterAsAddress(int index, Address value);
+
+  public CFrame getTopFrame(Debugger dbg);
 }
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/amd64/AMD64ThreadContext.java	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/amd64/AMD64ThreadContext.java	Wed Sep 05 12:00:30 2012 -0700
@@ -25,6 +25,7 @@
 package sun.jvm.hotspot.debugger.amd64;
 
 import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.debugger.cdbg.*;
 
 /** Specifies the thread context on amd64 platforms; only a sub-portion
  * of the context is guaranteed to be present on all operating
@@ -98,6 +99,10 @@
         return data[index];
     }
 
+    public CFrame getTopFrame(Debugger dbg) {
+        return null;
+    }
+
     /** This can't be implemented in this class since we would have to
      * tie the implementation to, for example, the debugging system */
     public abstract void setRegisterAsAddress(int index, Address value);
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/ia64/IA64ThreadContext.java	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/ia64/IA64ThreadContext.java	Wed Sep 05 12:00:30 2012 -0700
@@ -25,6 +25,7 @@
 package sun.jvm.hotspot.debugger.ia64;
 
 import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.debugger.cdbg.*;
 
 /** Specifies the thread context on ia64 platform; only a sub-portion
     of the context is guaranteed to be present on all operating
@@ -172,6 +173,10 @@
     return data[index];
   }
 
+  public CFrame getTopFrame(Debugger dbg) {
+    return null;
+  }
+
   /** This can't be implemented in this class since we would have to
       tie the implementation to, for example, the debugging system */
   public abstract void setRegisterAsAddress(int index, Address value);
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxCDebugger.java	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxCDebugger.java	Wed Sep 05 12:00:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -107,7 +107,9 @@
        if (pc == null) return null;
        return new LinuxSPARCCFrame(dbg, sp, pc, LinuxDebuggerLocal.getAddressSize());
     } else {
-       throw new DebuggerException(cpu + " is not yet supported");
+       // Runtime exception thrown by LinuxThreadContextFactory if unknown cpu
+       ThreadContext context = (ThreadContext) thread.getContext();
+       return context.getTopFrame(dbg);
     }
   }
 
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxThreadContextFactory.java	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxThreadContextFactory.java	Wed Sep 05 12:00:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,7 @@
 
 package sun.jvm.hotspot.debugger.linux;
 
+import java.lang.reflect.*;
 import sun.jvm.hotspot.debugger.*;
 import sun.jvm.hotspot.debugger.linux.amd64.*;
 import sun.jvm.hotspot.debugger.linux.ia64.*;
@@ -41,8 +42,16 @@
          return new LinuxIA64ThreadContext(dbg);
       } else if (cpu.equals("sparc")) {
          return new LinuxSPARCThreadContext(dbg);
-      } else {
-         throw new RuntimeException("cpu " + cpu + " is not yet supported");
+      } else  {
+        try {
+          Class tcc = Class.forName("sun.jvm.hotspot.debugger.linux." +
+             cpu.toLowerCase() + ".Linux" + cpu.toUpperCase() +
+             "ThreadContext");
+          Constructor[] ctcc = tcc.getConstructors();
+          return (ThreadContext)ctcc[0].newInstance(dbg);
+        } catch (Exception e) {
+          throw new RuntimeException("cpu " + cpu + " is not yet supported");
+        }
       }
    }
 }
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcDebuggerLocal.java	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcDebuggerLocal.java	Wed Sep 05 12:00:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
 import java.io.*;
 import java.net.*;
 import java.util.*;
+import java.lang.reflect.*;
 import sun.jvm.hotspot.debugger.*;
 import sun.jvm.hotspot.debugger.cdbg.*;
 import sun.jvm.hotspot.debugger.proc.amd64.*;
@@ -86,7 +87,16 @@
             pcRegIndex = AMD64ThreadContext.RIP;
             fpRegIndex = AMD64ThreadContext.RBP;
         } else {
+          try {
+            Class tfc = Class.forName("sun.jvm.hotspot.debugger.proc." +
+               cpu.toLowerCase() + ".Proc" + cpu.toUpperCase() +
+               "ThreadFactory");
+            Constructor[] ctfc = tfc.getConstructors();
+            threadFactory = (ProcThreadFactory)ctfc[0].newInstance(this);
+          } catch (Exception e) {
             throw new RuntimeException("Thread access for CPU architecture " + PlatformInfo.getCPU() + " not yet supported");
+            // Note: pcRegIndex and fpRegIndex do not appear to be referenced
+          }
         }
         if (useCache) {
             // Cache portion of the remote process's address space.
@@ -375,7 +385,11 @@
         int pagesize = getPageSize0();
         if (pagesize == -1) {
             // return the hard coded default value.
-            pagesize = (PlatformInfo.getCPU().equals("x86"))? 4096 : 8192;
+            if (PlatformInfo.getCPU().equals("sparc") ||
+                PlatformInfo.getCPU().equals("amd64") )
+               pagesize = 8196;
+            else
+               pagesize = 4096;
         }
         return pagesize;
     }
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java	Wed Sep 05 12:00:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
 
 import java.rmi.*;
 import java.util.*;
+import java.lang.reflect.*;
 
 import sun.jvm.hotspot.debugger.*;
 import sun.jvm.hotspot.debugger.cdbg.*;
@@ -70,7 +71,18 @@
         cacheNumPages = parseCacheNumPagesProperty(cacheSize / cachePageSize);
         unalignedAccessesOkay = true;
       } else {
-        throw new DebuggerException("Thread access for CPU architecture " + cpu + " not yet supported");
+        try {
+          Class tf = Class.forName("sun.jvm.hotspot.debugger.remote." +
+            cpu.toLowerCase() + ".Remote" + cpu.toUpperCase() +
+            "ThreadFactory");
+          Constructor[] ctf = tf.getConstructors();
+          threadFactory = (RemoteThreadFactory)ctf[0].newInstance(this);
+        } catch (Exception e) {
+          throw new DebuggerException("Thread access for CPU architecture " + cpu + " not yet supported");
+        }
+        cachePageSize = 4096;
+        cacheNumPages = parseCacheNumPagesProperty(cacheSize / cachePageSize);
+        unalignedAccessesOkay = false;
       }
 
       // Cache portion of the remote process's address space.
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/sparc/SPARCThreadContext.java	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/sparc/SPARCThreadContext.java	Wed Sep 05 12:00:30 2012 -0700
@@ -25,6 +25,7 @@
 package sun.jvm.hotspot.debugger.sparc;
 
 import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.debugger.cdbg.*;
 
 /** Currently provides just the minimal information necessary to get
     stack traces working. FIXME: currently hardwired for v9 -- will
@@ -124,6 +125,10 @@
     return data[index];
   }
 
+  public CFrame getTopFrame(Debugger dbg) {
+    return null;
+  }
+
   /** This can't be implemented in this class since we would have to
       tie the implementation to, for example, the debugging system */
   public abstract void setRegisterAsAddress(int index, Address value);
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/x86/X86ThreadContext.java	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/x86/X86ThreadContext.java	Wed Sep 05 12:00:30 2012 -0700
@@ -25,6 +25,7 @@
 package sun.jvm.hotspot.debugger.x86;
 
 import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.debugger.cdbg.*;
 
 /** Specifies the thread context on x86 platforms; only a sub-portion
     of the context is guaranteed to be present on all operating
@@ -109,6 +110,10 @@
     return data[index];
   }
 
+  public CFrame getTopFrame(Debugger dbg) {
+    return null;
+  }
+
   /** This can't be implemented in this class since we would have to
       tie the implementation to, for example, the debugging system */
   public abstract void setRegisterAsAddress(int index, Address value);
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java	Wed Sep 05 12:00:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -91,6 +91,16 @@
                 access = new LinuxAMD64JavaThreadPDAccess();
             } else if (cpu.equals("sparc")) {
                 access = new LinuxSPARCJavaThreadPDAccess();
+            } else {
+              try {
+                access = (JavaThreadPDAccess)
+                  Class.forName("sun.jvm.hotspot.runtime.linux_" +
+                     cpu.toLowerCase() + ".Linux" + cpu.toUpperCase() +
+                     "JavaThreadPDAccess").newInstance();
+              } catch (Exception e) {
+                throw new RuntimeException("OS/CPU combination " + os + "/" + cpu +
+                                           " not yet supported");
+              }
             }
         } else if (os.equals("bsd")) {
             if (cpu.equals("x86")) {
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java	Wed Sep 05 12:00:30 2012 -0700
@@ -92,6 +92,8 @@
   private boolean      usingServerCompiler;
   /** Flag indicating whether UseTLAB is turned on */
   private boolean      useTLAB;
+  /** Flag indicating whether invokedynamic support is on */
+  private boolean      enableInvokeDynamic;
   /** alignment constants */
   private boolean      isLP64;
   private int          bytesPerLong;
@@ -317,6 +319,7 @@
     }
 
     useTLAB = (db.lookupIntConstant("UseTLAB").intValue() != 0);
+    enableInvokeDynamic = (db.lookupIntConstant("EnableInvokeDynamic").intValue() != 0);
 
     if (debugger != null) {
       isLP64 = debugger.getMachineDescription().isLP64();
@@ -552,6 +555,10 @@
     return useTLAB;
   }
 
+  public boolean getEnableInvokeDynamic() {
+    return enableInvokeDynamic;
+  }
+
   public TypeDataBase getTypeDataBase() {
     return db;
   }
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java	Wed Sep 05 12:00:30 2012 -0700
@@ -204,7 +204,13 @@
       } else if (cpu.equals("ia64")) {
          cpuHelper = new IA64Helper();
       } else {
+        try {
+          cpuHelper = (CPUHelper)Class.forName("sun.jvm.hotspot.asm." +
+             cpu.toLowerCase() + "." + cpu.toUpperCase() +
+             "Helper").newInstance();
+        } catch (Exception e) {
           throw new RuntimeException("cpu '" + cpu + "' is not yet supported!");
+        }
       }
    }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/AltPlatformInfo.java	Wed Sep 05 12:00:30 2012 -0700
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.utilities;
+
+public interface AltPlatformInfo {
+  // Additional cpu types can be tested via this interface
+
+  public boolean knownCPU(String cpu);
+}
\ No newline at end of file
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java	Wed Sep 05 12:00:30 2012 -0700
@@ -64,6 +64,13 @@
     } else if (cpu.equals("ia64") || cpu.equals("amd64") || cpu.equals("x86_64")) {
       return cpu;
     } else {
+      try {
+        Class pic = Class.forName("sun.jvm.hotspot.utilities.PlatformInfoClosed");
+        AltPlatformInfo api = (AltPlatformInfo)pic.newInstance();
+        if (api.knownCPU(cpu)) {
+          return cpu;
+        }
+      } catch (Exception e) {}
       throw new UnsupportedPlatformException("CPU type " + cpu + " not yet supported");
     }
   }
--- a/hotspot/make/defs.make	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/make/defs.make	Wed Sep 05 12:00:30 2012 -0700
@@ -22,6 +22,14 @@
 #  
 #
 
+ifeq ($(HS_ALT_MAKE),)
+  ifneq ($(OPENJDK),true)
+    HS_ALT_MAKE=$(GAMMADIR)/make/closed
+  else
+    HS_ALT_MAKE=NO_SUCH_PATH
+  endif
+endif
+
 # The common definitions for hotspot builds.
 
 # Optionally include SPEC file generated by configure.
@@ -327,3 +335,4 @@
 ifndef JAVASE_EMBEDDED
 EXPORT_LIST += $(EXPORT_INCLUDE_DIR)/jfr.h
 endif
+
--- a/hotspot/make/hotspot_version	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/make/hotspot_version	Wed Sep 05 12:00:30 2012 -0700
@@ -35,7 +35,7 @@
 
 HS_MAJOR_VER=24
 HS_MINOR_VER=0
-HS_BUILD_NUMBER=21
+HS_BUILD_NUMBER=22
 
 JDK_MAJOR_VER=1
 JDK_MINOR_VER=8
--- a/hotspot/make/linux/makefiles/defs.make	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/make/linux/makefiles/defs.make	Wed Sep 05 12:00:30 2012 -0700
@@ -295,6 +295,8 @@
 ADD_SA_BINARIES/arm   = 
 ADD_SA_BINARIES/zero  = 
 
+-include $(HS_ALT_MAKE)/linux/makefiles/defs.make
+
 EXPORT_LIST += $(ADD_SA_BINARIES/$(HS_ARCH))
 
 
--- a/hotspot/make/linux/makefiles/sa.make	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/make/linux/makefiles/sa.make	Wed Sep 05 12:00:30 2012 -0700
@@ -30,10 +30,16 @@
 
 include $(GAMMADIR)/make/linux/makefiles/rules.make
 
+include $(GAMMADIR)/make/defs.make
+include $(GAMMADIR)/make/altsrc.make
+
 AGENT_DIR = $(GAMMADIR)/agent
 
 include $(GAMMADIR)/make/sa.files
 
+-include $(HS_ALT_MAKE)/linux/makefiles/sa.make
+
+
 TOPDIR    = $(shell echo `pwd`)
 GENERATED = $(TOPDIR)/../generated
 
@@ -52,17 +58,15 @@
 SA_PROPERTIES = $(SA_CLASSDIR)/sa.properties
 
 # if $(AGENT_DIR) does not exist, we don't build SA
-# also, we don't build SA on Itanium, PowerPC, ARM or zero.
+# also, we don't build SA on Itanium or zero.
 
 all: 
 	if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" \
-             -a "$(SRCARCH)" != "arm" \
-             -a "$(SRCARCH)" != "ppc" \
              -a "$(SRCARCH)" != "zero" ] ; then \
 	   $(MAKE) -f sa.make $(GENERATED)/sa-jdi.jar; \
 	fi
 
-$(GENERATED)/sa-jdi.jar: $(AGENT_FILES)
+$(GENERATED)/sa-jdi.jar:: $(AGENT_FILES)
 	$(QUIETLY) echo "Making $@"
 	$(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \
 	  echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \
@@ -111,3 +115,5 @@
 	rm -rf $(SA_CLASSDIR)
 	rm -rf $(GENERATED)/sa-jdi.jar
 	rm -rf $(AGENT_FILES_LIST)
+
+-include $(HS_ALT_MAKE)/linux/makefiles/sa-rules.make
--- a/hotspot/make/linux/makefiles/saproc.make	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/make/linux/makefiles/saproc.make	Wed Sep 05 12:00:30 2012 -0700
@@ -21,6 +21,8 @@
 # questions.
 #  
 #
+include $(GAMMADIR)/make/defs.make
+include $(GAMMADIR)/make/altsrc.make
 
 # Rules to build serviceability agent library, used by vm.make
 
@@ -48,6 +50,8 @@
              $(SASRCDIR)/ps_core.c                    \
              $(SASRCDIR)/LinuxDebuggerLocal.c
 
+-include $(HS_ALT_MAKE)/linux/makefiles/saproc.make
+
 SAMAPFILE = $(SASRCDIR)/mapfile
 
 DEST_SAPROC           = $(JDK_LIBDIR)/$(LIBSAPROC)
@@ -60,15 +64,19 @@
 endif
 
 # if $(AGENT_DIR) does not exist, we don't build SA
-# also, we don't build SA on Itanium, PPC, ARM or zero.
+# also, we don't build SA on Itanium or zero.
 
 ifneq ($(wildcard $(AGENT_DIR)),)
-ifneq ($(filter-out ia64 arm ppc zero,$(SRCARCH)),)
+ifneq ($(filter-out ia64 zero,$(SRCARCH)),)
   BUILDLIBSAPROC = $(LIBSAPROC)
 endif
 endif
 
-
+ifneq ($(ALT_SASRCDIR),)
+ALT_SAINCDIR=-I$(ALT_SASRCDIR)
+else
+ALT_SAINCDIR=
+endif
 SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) $(LDFLAGS_HASH_STYLE)
 
 $(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE)
@@ -84,6 +92,7 @@
 	           -I$(GENERATED)                                       \
 	           -I$(BOOT_JAVA_HOME)/include                          \
 	           -I$(BOOT_JAVA_HOME)/include/$(Platform_os_family)    \
+			   $(ALT_SAINCDIR) 										\
 	           $(SASRCFILES)                                        \
 	           $(SA_LFLAGS)                                         \
 	           $(SA_DEBUG_CFLAGS)                                   \
--- a/hotspot/make/pic.make	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/make/pic.make	Wed Sep 05 12:00:30 2012 -0700
@@ -32,7 +32,7 @@
   ifndef LP64
     PARTIAL_NONPIC=1
   endif
-  PIC_ARCH = ppc
+  PIC_ARCH = ppc arm
   ifneq ("$(filter $(PIC_ARCH),$(BUILDARCH))","")
     PARTIAL_NONPIC=0
   endif
--- a/hotspot/src/cpu/sparc/vm/globals_sparc.hpp	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/src/cpu/sparc/vm/globals_sparc.hpp	Wed Sep 05 12:00:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -75,4 +75,43 @@
 
 // GC Ergo Flags
 define_pd_global(intx, CMSYoungGenPerWorker, 16*M);  // default max size of CMS young gen, per GC worker thread
+
+#define ARCH_FLAGS(develop, product, diagnostic, experimental, notproduct) \
+                                                                            \
+  product(intx, UseVIS, 99,                                                 \
+          "Highest supported VIS instructions set on Sparc")                \
+                                                                            \
+  product(bool, UseCBCond, false,                                           \
+          "Use compare and branch instruction on SPARC")                    \
+                                                                            \
+  product(bool, UseBlockZeroing, false,                                     \
+          "Use special cpu instructions for block zeroing")                 \
+                                                                            \
+  product(intx, BlockZeroingLowLimit, 2048,                                 \
+          "Minimum size in bytes when block zeroing will be used")          \
+                                                                            \
+  product(bool, UseBlockCopy, false,                                        \
+          "Use special cpu instructions for block copy")                    \
+                                                                            \
+  product(intx, BlockCopyLowLimit, 2048,                                    \
+          "Minimum size in bytes when block copy will be used")             \
+                                                                            \
+  develop(bool, UseV8InstrsOnly, false,                                     \
+          "Use SPARC-V8 Compliant instruction subset")                      \
+                                                                            \
+  product(bool, UseNiagaraInstrs, false,                                    \
+          "Use Niagara-efficient instruction subset")                       \
+                                                                            \
+  develop(bool, UseCASForSwap, false,                                       \
+          "Do not use swap instructions, but only CAS (in a loop) on SPARC")\
+                                                                            \
+  product(uintx,  ArraycopySrcPrefetchDistance, 0,                          \
+          "Distance to prefetch source array in arracopy")                  \
+                                                                            \
+  product(uintx,  ArraycopyDstPrefetchDistance, 0,                          \
+          "Distance to prefetch destination array in arracopy")             \
+                                                                            \
+  develop(intx, V8AtomicOperationUnderLockSpinCount,    50,                 \
+          "Number of times to spin wait on a v8 atomic operation lock")     \
+
 #endif // CPU_SPARC_VM_GLOBALS_SPARC_HPP
--- a/hotspot/src/cpu/x86/vm/globals_x86.hpp	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/src/cpu/x86/vm/globals_x86.hpp	Wed Sep 05 12:00:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -78,4 +78,53 @@
 
 // GC Ergo Flags
 define_pd_global(intx, CMSYoungGenPerWorker, 64*M);  // default max size of CMS young gen, per GC worker thread
+
+#define ARCH_FLAGS(develop, product, diagnostic, experimental, notproduct) \
+                                                                            \
+  develop(bool, IEEEPrecision, true,                                        \
+          "Enables IEEE precision (for INTEL only)")                        \
+                                                                            \
+  product(intx, FenceInstruction, 0,                                        \
+          "(Unsafe,Unstable) Experimental")                                 \
+                                                                            \
+  product(intx,  ReadPrefetchInstr, 0,                                      \
+          "Prefetch instruction to prefetch ahead")                         \
+                                                                            \
+  product(bool, UseStoreImmI16, true,                                       \
+          "Use store immediate 16-bits value instruction on x86")           \
+                                                                            \
+  product(intx, UseAVX, 99,                                                 \
+          "Highest supported AVX instructions set on x86/x64")              \
+                                                                            \
+  diagnostic(bool, UseIncDec, true,                                         \
+          "Use INC, DEC instructions on x86")                               \
+                                                                            \
+  product(bool, UseNewLongLShift, false,                                    \
+          "Use optimized bitwise shift left")                               \
+                                                                            \
+  product(bool, UseAddressNop, false,                                       \
+          "Use '0F 1F [addr]' NOP instructions on x86 cpus")                \
+                                                                            \
+  product(bool, UseXmmLoadAndClearUpper, true,                              \
+          "Load low part of XMM register and clear upper part")             \
+                                                                            \
+  product(bool, UseXmmRegToRegMoveAll, false,                               \
+          "Copy all XMM register bits when moving value between registers") \
+                                                                            \
+  product(bool, UseXmmI2D, false,                                           \
+          "Use SSE2 CVTDQ2PD instruction to convert Integer to Double")     \
+                                                                            \
+  product(bool, UseXmmI2F, false,                                           \
+          "Use SSE2 CVTDQ2PS instruction to convert Integer to Float")      \
+                                                                            \
+  product(bool, UseUnalignedLoadStores, false,                              \
+          "Use SSE2 MOVDQU instruction for Arraycopy")                      \
+                                                                            \
+  /* assembler */                                                           \
+  product(bool, Use486InstrsOnly, false,                                    \
+          "Use 80486 Compliant instruction subset")                         \
+                                                                            \
+  product(bool, UseCountLeadingZerosInstruction, false,                     \
+          "Use count leading zeros instruction")                            \
+
 #endif // CPU_X86_VM_GLOBALS_X86_HPP
--- a/hotspot/src/cpu/zero/vm/globals_zero.hpp	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/src/cpu/zero/vm/globals_zero.hpp	Wed Sep 05 12:00:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -60,4 +60,7 @@
 
 // GC Ergo Flags
 define_pd_global(intx, CMSYoungGenPerWorker, 16*M);  // default max size of CMS young gen, per GC worker thread
+
+#define ARCH_FLAGS(develop, product, diagnostic, experimental, notproduct)
+
 #endif // CPU_ZERO_VM_GLOBALS_ZERO_HPP
--- a/hotspot/src/os/bsd/vm/os_bsd.hpp	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/src/os/bsd/vm/os_bsd.hpp	Wed Sep 05 12:00:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -202,7 +202,7 @@
   static void fast_thread_clock_init(void);
 #endif
 
-  static bool supports_monotonic_clock() {
+  static inline bool supports_monotonic_clock() {
     return _clock_gettime != NULL;
   }
 
--- a/hotspot/src/os/linux/vm/os_linux.hpp	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/src/os/linux/vm/os_linux.hpp	Wed Sep 05 12:00:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -178,7 +178,7 @@
   // fast POSIX clocks support
   static void fast_thread_clock_init(void);
 
-  static bool supports_monotonic_clock() {
+  static inline bool supports_monotonic_clock() {
     return _clock_gettime != NULL;
   }
 
--- a/hotspot/src/os/posix/launcher/launcher.script	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/src/os/posix/launcher/launcher.script	Wed Sep 05 12:00:30 2012 -0700
@@ -29,7 +29,7 @@
 # inside Emacs".
 #
 # If the first parameter is "-dbx", HotSpot will be launched inside dbx.
-# 
+#
 # If the first parameter is "-valgrind", HotSpot will be launched
 # inside Valgrind (http://valgrind.kde.org) using the Memcheck skin,
 # and with memory leak detection enabled.  This currently (2005jan19)
@@ -45,19 +45,19 @@
 
 # This is the name of the gdb binary to use
 if [ ! "$GDB" ]
-then 
+then
     GDB=gdb
 fi
 
 # This is the name of the gdb binary to use
 if [ ! "$DBX" ]
-then 
+then
     DBX=dbx
 fi
 
 # This is the name of the Valgrind binary to use
 if [ ! "$VALGRIND" ]
-then 
+then
     VALGRIND=valgrind
 fi
 
@@ -98,7 +98,7 @@
 JDK=
 if [ "${ALT_JAVA_HOME}" = "" ]; then
     . ${MYDIR}/jdkpath.sh
-else 
+else
     JDK=${ALT_JAVA_HOME%%/jre};
 fi
 
@@ -114,22 +114,34 @@
 # any.
 JRE=$JDK/jre
 JAVA_HOME=$JDK
+export JAVA_HOME
+
 ARCH=@@LIBARCH@@
-
 SBP=${MYDIR}:${JRE}/lib/${ARCH}
 
-# Set up a suitable LD_LIBRARY_PATH
 
-if [ -z "$LD_LIBRARY_PATH" ]
+# Set up a suitable LD_LIBRARY_PATH or DYLD_LIBRARY_PATH
+OS=`uname -s`
+if [ "${OS}" = "Darwin" ]
 then
-    LD_LIBRARY_PATH="$SBP"
+    if [ -z "$DYLD_LIBRARY_PATH" ]
+    then
+        DYLD_LIBRARY_PATH="$SBP"
+    else
+        DYLD_LIBRARY_PATH="$SBP:$DYLD_LIBRARY_PATH"
+    fi
+    export DYLD_LIBRARY_PATH
 else
-    LD_LIBRARY_PATH="$SBP:$LD_LIBRARY_PATH"
+    # not 'Darwin'
+    if [ -z "$LD_LIBRARY_PATH" ]
+    then
+        LD_LIBRARY_PATH="$SBP"
+    else
+        LD_LIBRARY_PATH="$SBP:$LD_LIBRARY_PATH"
+    fi
+    export LD_LIBRARY_PATH
 fi
 
-export LD_LIBRARY_PATH
-export JAVA_HOME
-
 JPARMS="$@ $JAVA_ARGS";
 
 # Locate the gamma development launcher
--- a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp	Wed Sep 05 12:00:30 2012 -0700
@@ -1646,15 +1646,15 @@
 
 
 void GraphBuilder::invoke(Bytecodes::Code code) {
-  const bool is_invokedynamic = (code == Bytecodes::_invokedynamic);
-
   bool will_link;
-  ciMethod*             target = stream()->get_method(will_link);
+  ciSignature* declared_signature = NULL;
+  ciMethod*             target = stream()->get_method(will_link, &declared_signature);
   ciKlass*              holder = stream()->get_declared_method_holder();
   const Bytecodes::Code bc_raw = stream()->cur_bc_raw();
+  assert(declared_signature != NULL, "cannot be null");
 
   // FIXME bail out for now
-  if ((bc_raw == Bytecodes::_invokehandle || is_invokedynamic) && !will_link) {
+  if (Bytecodes::has_optional_appendix(bc_raw) && !will_link) {
     BAILOUT("unlinked call site (FIXME needs patching or recompile support)");
   }
 
@@ -1840,7 +1840,7 @@
       bool success = false;
       if (target->is_method_handle_intrinsic()) {
         // method handle invokes
-        success = for_method_handle_inline(target);
+        success = try_method_handle_inline(target);
       } else {
         // static binding => check if callee is ok
         success = try_inline(inline_target, (cha_monomorphic_target != NULL) || (exact_target != NULL), code, better_receiver);
@@ -1877,7 +1877,7 @@
 
   // inlining not successful => standard invoke
   bool is_loaded = target->is_loaded();
-  ValueType* result_type = as_ValueType(target->return_type());
+  ValueType* result_type = as_ValueType(declared_signature->return_type());
   ValueStack* state_before = copy_state_exhandling();
 
   // The bytecode (code) might change in this method so we are checking this very late.
@@ -3823,7 +3823,7 @@
 }
 
 
-bool GraphBuilder::for_method_handle_inline(ciMethod* callee) {
+bool GraphBuilder::try_method_handle_inline(ciMethod* callee) {
   ValueStack* state_before = state()->copy_for_parsing();
   vmIntrinsics::ID iid = callee->intrinsic_id();
   switch (iid) {
@@ -3858,7 +3858,7 @@
         // If the target is another method handle invoke try recursivly to get
         // a better target.
         if (target->is_method_handle_intrinsic()) {
-          if (for_method_handle_inline(target)) {
+          if (try_method_handle_inline(target)) {
             return true;
           }
         } else {
--- a/hotspot/src/share/vm/c1/c1_GraphBuilder.hpp	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/src/share/vm/c1/c1_GraphBuilder.hpp	Wed Sep 05 12:00:30 2012 -0700
@@ -346,7 +346,7 @@
   const char* should_not_inline(ciMethod* callee) const;
 
   // JSR 292 support
-  bool for_method_handle_inline(ciMethod* callee);
+  bool try_method_handle_inline(ciMethod* callee);
 
   // helpers
   void inline_bailout(const char* msg);
--- a/hotspot/src/share/vm/c1/c1_globals.hpp	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/src/share/vm/c1/c1_globals.hpp	Wed Sep 05 12:00:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -156,18 +156,12 @@
   develop(bool, CanonicalizeNodes, true,                                    \
           "Canonicalize graph nodes")                                       \
                                                                             \
-  develop(bool, CanonicalizeExperimental, false,                            \
-          "Canonicalize graph nodes, experimental code")                    \
-                                                                            \
   develop(bool, PrintCanonicalization, false,                               \
           "Print graph node canonicalization")                              \
                                                                             \
   develop(bool, UseTableRanges, true,                                       \
           "Faster versions of lookup table using ranges")                   \
                                                                             \
-  develop(bool, UseFastExceptionHandling, true,                             \
-          "Faster handling of exceptions")                                  \
-                                                                            \
   develop_pd(bool, RoundFPResults,                                          \
           "Indicates whether rounding is needed for floating point results")\
                                                                             \
@@ -224,9 +218,6 @@
   develop(bool, PinAllInstructions, false,                                  \
           "All instructions are pinned")                                    \
                                                                             \
-  develop(bool, ValueStackPinStackAll, true,                                \
-          "Pinning in ValueStack pin everything")                           \
-                                                                            \
   develop(bool, UseFastNewInstance, true,                                   \
           "Use fast inlined instance allocation")                           \
                                                                             \
--- a/hotspot/src/share/vm/ci/bcEscapeAnalyzer.cpp	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/src/share/vm/ci/bcEscapeAnalyzer.cpp	Wed Sep 05 12:00:30 2012 -0700
@@ -236,12 +236,16 @@
   ciInstanceKlass* callee_holder = ciEnv::get_instance_klass_for_declared_method_holder(holder);
   ciInstanceKlass* actual_recv = callee_holder;
 
-  // some methods are obviously bindable without any type checks so
-  // convert them directly to an invokespecial.
+  // Some methods are obviously bindable without any type checks so
+  // convert them directly to an invokespecial or invokestatic.
   if (target->is_loaded() && !target->is_abstract() && target->can_be_statically_bound()) {
     switch (code) {
-    case Bytecodes::_invokevirtual:  code = Bytecodes::_invokespecial;  break;
-    case Bytecodes::_invokehandle:   code = Bytecodes::_invokestatic;   break;
+    case Bytecodes::_invokevirtual:
+      code = Bytecodes::_invokespecial;
+      break;
+    case Bytecodes::_invokehandle:
+      code = target->is_static() ? Bytecodes::_invokestatic : Bytecodes::_invokespecial;
+      break;
     }
   }
 
@@ -826,8 +830,8 @@
         break;
       case Bytecodes::_getstatic:
       case Bytecodes::_getfield:
-        { bool will_link;
-          ciField* field = s.get_field(will_link);
+        { bool ignored_will_link;
+          ciField* field = s.get_field(ignored_will_link);
           BasicType field_type = field->type()->basic_type();
           if (s.cur_bc() != Bytecodes::_getstatic) {
             set_method_escape(state.apop());
@@ -865,16 +869,21 @@
       case Bytecodes::_invokestatic:
       case Bytecodes::_invokedynamic:
       case Bytecodes::_invokeinterface:
-        { bool will_link;
-          ciMethod* target = s.get_method(will_link);
-          ciKlass* holder = s.get_declared_method_holder();
+        { bool ignored_will_link;
+          ciSignature* declared_signature = NULL;
+          ciMethod* target = s.get_method(ignored_will_link, &declared_signature);
+          ciKlass*  holder = s.get_declared_method_holder();
+          assert(declared_signature != NULL, "cannot be null");
           // Push appendix argument, if one.
           if (s.has_appendix()) {
             state.apush(unknown_obj);
           }
           // Pass in raw bytecode because we need to see invokehandle instructions.
           invoke(state, s.cur_bc_raw(), target, holder);
-          ciType* return_type = target->return_type();
+          // We are using the return type of the declared signature here because
+          // it might be a more concrete type than the one from the target (for
+          // e.g. invokedynamic and invokehandle).
+          ciType* return_type = declared_signature->return_type();
           if (!return_type->is_primitive_type()) {
             state.apush(unknown_obj);
           } else if (return_type->is_one_word()) {
--- a/hotspot/src/share/vm/ci/ciEnv.cpp	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/src/share/vm/ci/ciEnv.cpp	Wed Sep 05 12:00:30 2012 -0700
@@ -738,91 +738,81 @@
 ciMethod* ciEnv::get_method_by_index_impl(constantPoolHandle cpool,
                                           int index, Bytecodes::Code bc,
                                           ciInstanceKlass* accessor) {
-  int holder_index = cpool->klass_ref_index_at(index);
-  bool holder_is_accessible;
-  ciKlass* holder = get_klass_by_index_impl(cpool, holder_index, holder_is_accessible, accessor);
-  ciInstanceKlass* declared_holder = get_instance_klass_for_declared_method_holder(holder);
+  if (bc == Bytecodes::_invokedynamic) {
+    ConstantPoolCacheEntry* secondary_entry = cpool->cache()->secondary_entry_at(index);
+    const bool is_resolved = !secondary_entry->is_f1_null();
+    // FIXME: code generation could allow for null (unlinked) call site
+    // The call site could be made patchable as follows:
+    // Load the appendix argument from the constant pool.
+    // Test the appendix argument and jump to a known deopt routine if it is null.
+    // Jump through a patchable call site, which is initially a deopt routine.
+    // Patch the call site to the nmethod entry point of the static compiled lambda form.
+    // As with other two-component call sites, both values must be independently verified.
 
-  // Get the method's name and signature.
-  Symbol* name_sym = cpool->name_ref_at(index);
-  Symbol* sig_sym  = cpool->signature_ref_at(index);
+    if (is_resolved) {
+      // Get the invoker methodOop and the extra argument from the constant pool.
+      methodOop adapter = secondary_entry->f2_as_vfinal_method();
+      return get_object(adapter)->as_method();
+    }
 
-  if (cpool->has_preresolution()
-      || (holder == ciEnv::MethodHandle_klass() &&
-          MethodHandles::is_signature_polymorphic_name(holder->get_klassOop(), name_sym))) {
-    // Short-circuit lookups for JSR 292-related call sites.
-    // That is, do not rely only on name-based lookups, because they may fail
-    // if the names are not resolvable in the boot class loader (7056328).
-    switch (bc) {
-    case Bytecodes::_invokevirtual:
-    case Bytecodes::_invokeinterface:
-    case Bytecodes::_invokespecial:
-    case Bytecodes::_invokestatic:
-      {
-        oop appendix_oop = NULL;
-        methodOop m = constantPoolOopDesc::method_at_if_loaded(cpool, index);
-        if (m != NULL) {
-          return get_object(m)->as_method();
-        }
-      }
-      break;
-    }
-  }
-
-  if (holder_is_accessible) { // Our declared holder is loaded.
-    instanceKlass* lookup = declared_holder->get_instanceKlass();
-    methodOop m = lookup_method(accessor->get_instanceKlass(), lookup, name_sym, sig_sym, bc);
-    if (m != NULL &&
-        (bc == Bytecodes::_invokestatic
-         ?  instanceKlass::cast(m->method_holder())->is_not_initialized()
-         : !instanceKlass::cast(m->method_holder())->is_loaded())) {
-      m = NULL;
-    }
-    if (m != NULL) {
-      // We found the method.
-      return get_object(m)->as_method();
-    }
-  }
-
-  // Either the declared holder was not loaded, or the method could
-  // not be found.  Create a dummy ciMethod to represent the failed
-  // lookup.
-  ciSymbol* name      = get_symbol(name_sym);
-  ciSymbol* signature = get_symbol(sig_sym);
-  return get_unloaded_method(declared_holder, name, signature, accessor);
-}
-
-
-// ------------------------------------------------------------------
-// ciEnv::get_fake_invokedynamic_method_impl
-ciMethod* ciEnv::get_fake_invokedynamic_method_impl(constantPoolHandle cpool,
-                                                    int index, Bytecodes::Code bc,
-                                                    ciInstanceKlass* accessor) {
-  // Compare the following logic with InterpreterRuntime::resolve_invokedynamic.
-  assert(bc == Bytecodes::_invokedynamic, "must be invokedynamic");
-
-  ConstantPoolCacheEntry* secondary_entry = cpool->cache()->secondary_entry_at(index);
-  bool is_resolved = !secondary_entry->is_f1_null();
-  // FIXME: code generation could allow for null (unlinked) call site
-  // The call site could be made patchable as follows:
-  // Load the appendix argument from the constant pool.
-  // Test the appendix argument and jump to a known deopt routine if it is null.
-  // Jump through a patchable call site, which is initially a deopt routine.
-  // Patch the call site to the nmethod entry point of the static compiled lambda form.
-  // As with other two-component call sites, both values must be independently verified.
-
-  // Call site might not be resolved yet.
-  // Stop the code path here with an unlinked method.
-  if (!is_resolved) {
+    // Fake a method that is equivalent to a declared method.
     ciInstanceKlass* holder    = get_object(SystemDictionary::MethodHandle_klass())->as_instance_klass();
     ciSymbol*        name      = ciSymbol::invokeBasic_name();
     ciSymbol*        signature = get_symbol(cpool->signature_ref_at(index));
     return get_unloaded_method(holder, name, signature, accessor);
+  } else {
+    const int holder_index = cpool->klass_ref_index_at(index);
+    bool holder_is_accessible;
+    ciKlass* holder = get_klass_by_index_impl(cpool, holder_index, holder_is_accessible, accessor);
+    ciInstanceKlass* declared_holder = get_instance_klass_for_declared_method_holder(holder);
+
+    // Get the method's name and signature.
+    Symbol* name_sym = cpool->name_ref_at(index);
+    Symbol* sig_sym  = cpool->signature_ref_at(index);
+
+    if (cpool->has_preresolution()
+        || (holder == ciEnv::MethodHandle_klass() &&
+            MethodHandles::is_signature_polymorphic_name(holder->get_klassOop(), name_sym))) {
+      // Short-circuit lookups for JSR 292-related call sites.
+      // That is, do not rely only on name-based lookups, because they may fail
+      // if the names are not resolvable in the boot class loader (7056328).
+      switch (bc) {
+      case Bytecodes::_invokevirtual:
+      case Bytecodes::_invokeinterface:
+      case Bytecodes::_invokespecial:
+      case Bytecodes::_invokestatic:
+        {
+          methodOop m = constantPoolOopDesc::method_at_if_loaded(cpool, index);
+          if (m != NULL) {
+            return get_object(m)->as_method();
+          }
+        }
+        break;
+      }
+    }
+
+    if (holder_is_accessible) {  // Our declared holder is loaded.
+      instanceKlass* lookup = declared_holder->get_instanceKlass();
+      methodOop m = lookup_method(accessor->get_instanceKlass(), lookup, name_sym, sig_sym, bc);
+      if (m != NULL &&
+          (bc == Bytecodes::_invokestatic
+           ?  instanceKlass::cast(m->method_holder())->is_not_initialized()
+           : !instanceKlass::cast(m->method_holder())->is_loaded())) {
+        m = NULL;
+      }
+      if (m != NULL) {
+        // We found the method.
+        return get_object(m)->as_method();
+      }
+    }
+
+    // Either the declared holder was not loaded, or the method could
+    // not be found.  Create a dummy ciMethod to represent the failed
+    // lookup.
+    ciSymbol* name      = get_symbol(name_sym);
+    ciSymbol* signature = get_symbol(sig_sym);
+    return get_unloaded_method(declared_holder, name, signature, accessor);
   }
-
-  // Get the invoker methodOop and the extra argument from the constant pool.
-  methodOop adapter = secondary_entry->f2_as_vfinal_method();
-  return get_object(adapter)->as_method();
 }
 
 
@@ -853,11 +843,7 @@
 ciMethod* ciEnv::get_method_by_index(constantPoolHandle cpool,
                                      int index, Bytecodes::Code bc,
                                      ciInstanceKlass* accessor) {
-  if (bc == Bytecodes::_invokedynamic) {
-    GUARDED_VM_ENTRY(return get_fake_invokedynamic_method_impl(cpool, index, bc, accessor);)
-  } else {
-    GUARDED_VM_ENTRY(return get_method_by_index_impl(          cpool, index, bc, accessor);)
-  }
+  GUARDED_VM_ENTRY(return get_method_by_index_impl(cpool, index, bc, accessor);)
 }
 
 
--- a/hotspot/src/share/vm/ci/ciEnv.hpp	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/src/share/vm/ci/ciEnv.hpp	Wed Sep 05 12:00:30 2012 -0700
@@ -152,9 +152,6 @@
   ciMethod*  get_method_by_index_impl(constantPoolHandle cpool,
                                       int method_index, Bytecodes::Code bc,
                                       ciInstanceKlass* loading_klass);
-  ciMethod*  get_fake_invokedynamic_method_impl(constantPoolHandle cpool,
-                                                int index, Bytecodes::Code bc,
-                                                ciInstanceKlass* accessor);
 
   // Helper methods
   bool       check_klass_accessibility(ciKlass* accessing_klass,
--- a/hotspot/src/share/vm/ci/ciMethod.cpp	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/src/share/vm/ci/ciMethod.cpp	Wed Sep 05 12:00:30 2012 -0700
@@ -1215,9 +1215,10 @@
   holder()->print_name_on(st);
   st->print(" signature=");
   signature()->as_symbol()->print_symbol_on(st);
-  st->print(" arg_size=%d", arg_size());
   if (is_loaded()) {
-    st->print(" loaded=true flags=");
+    st->print(" loaded=true");
+    st->print(" arg_size=%d", arg_size());
+    st->print(" flags=");
     flags().print_member_flags(st);
   } else {
     st->print(" loaded=false");
--- a/hotspot/src/share/vm/ci/ciStreams.cpp	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/src/share/vm/ci/ciStreams.cpp	Wed Sep 05 12:00:30 2012 -0700
@@ -355,11 +355,23 @@
 // ciBytecodeStream::get_method
 //
 // If this is a method invocation bytecode, get the invoked method.
-ciMethod* ciBytecodeStream::get_method(bool& will_link) {
+// Additionally return the declared signature to get more concrete
+// type information if required (Cf. invokedynamic and invokehandle).
+ciMethod* ciBytecodeStream::get_method(bool& will_link, ciSignature* *declared_signature_result) {
   VM_ENTRY_MARK;
+  ciEnv* env = CURRENT_ENV;
   constantPoolHandle cpool(_method->get_methodOop()->constants());
-  ciMethod* m = CURRENT_ENV->get_method_by_index(cpool, get_method_index(), cur_bc(), _holder);
+  ciMethod* m = env->get_method_by_index(cpool, get_method_index(), cur_bc(), _holder);
   will_link = m->is_loaded();
+  // Get declared method signature and return it.
+  if (has_optional_appendix()) {
+    const int sig_index = get_method_signature_index();
+    Symbol* sig_sym = cpool->symbol_at(sig_index);
+    ciKlass* pool_holder = env->get_object(cpool->pool_holder())->as_klass();
+    (*declared_signature_result) = new (env->arena()) ciSignature(pool_holder, cpool, env->get_symbol(sig_sym));
+  } else {
+    (*declared_signature_result) = m->signature();
+  }
   return m;
 }
 
@@ -419,35 +431,18 @@
 }
 
 // ------------------------------------------------------------------
-// ciBytecodeStream::get_declared_method_signature
-//
-// Get the declared signature of the currently referenced method.
-//
-// This is always the same as the signature of the resolved method
-// itself, except for _invokehandle and _invokedynamic calls.
-//
-ciSignature* ciBytecodeStream::get_declared_method_signature() {
-  int sig_index = get_method_signature_index();
-  VM_ENTRY_MARK;
-  ciEnv* env = CURRENT_ENV;
-  constantPoolHandle cpool(_method->get_methodOop()->constants());
-  Symbol* sig_sym = cpool->symbol_at(sig_index);
-  ciKlass* pool_holder = env->get_object(cpool->pool_holder())->as_klass();
-  return new (env->arena()) ciSignature(pool_holder, cpool, env->get_symbol(sig_sym));
-}
-
-// ------------------------------------------------------------------
 // ciBytecodeStream::get_method_signature_index
 //
 // Get the constant pool index of the signature of the method
 // referenced by the current bytecode.  Used for generating
 // deoptimization information.
 int ciBytecodeStream::get_method_signature_index() {
-  VM_ENTRY_MARK;
-  constantPoolOop cpool = _holder->get_instanceKlass()->constants();
-  int method_index = get_method_index();
-  int name_and_type_index = cpool->name_and_type_ref_index_at(method_index);
-  return cpool->signature_ref_index_at(name_and_type_index);
+  GUARDED_VM_ENTRY(
+    constantPoolOop cpool = _holder->get_instanceKlass()->constants();
+    const int method_index = get_method_index();
+    const int name_and_type_index = cpool->name_and_type_ref_index_at(method_index);
+    return cpool->signature_ref_index_at(name_and_type_index);
+  )
 }
 
 // ------------------------------------------------------------------
--- a/hotspot/src/share/vm/ci/ciStreams.hpp	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/src/share/vm/ci/ciStreams.hpp	Wed Sep 05 12:00:30 2012 -0700
@@ -151,6 +151,8 @@
   // Does this instruction contain an index which refes into the CP cache?
   bool has_cache_index() const { return Bytecodes::uses_cp_cache(cur_bc_raw()); }
 
+  bool has_optional_appendix() { return Bytecodes::has_optional_appendix(cur_bc_raw()); }
+
   int get_index_u1() const {
     return bytecode().get_index_u1(cur_bc_raw());
   }
@@ -257,13 +259,11 @@
   int      get_field_holder_index();
   int      get_field_signature_index();
 
-  // If this is a method invocation bytecode, get the invoked method.
-  ciMethod* get_method(bool& will_link);
+  ciMethod* get_method(bool& will_link, ciSignature* *declared_signature_result);
   bool      has_appendix();
   ciObject* get_appendix();
   ciKlass*  get_declared_method_holder();
   int       get_method_holder_index();
-  ciSignature* get_declared_method_signature();
   int       get_method_signature_index();
 
   ciCPCache*  get_cpcache() const;
--- a/hotspot/src/share/vm/ci/ciTypeFlow.cpp	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/src/share/vm/ci/ciTypeFlow.cpp	Wed Sep 05 12:00:30 2012 -0700
@@ -643,9 +643,11 @@
 // ------------------------------------------------------------------
 // ciTypeFlow::StateVector::do_invoke
 void ciTypeFlow::StateVector::do_invoke(ciBytecodeStream* str,
-                                        bool has_receiver_foo) {
+                                        bool has_receiver) {
   bool will_link;
-  ciMethod* callee = str->get_method(will_link);
+  ciSignature* declared_signature = NULL;
+  ciMethod* callee = str->get_method(will_link, &declared_signature);
+  assert(declared_signature != NULL, "cannot be null");
   if (!will_link) {
     // We weren't able to find the method.
     if (str->cur_bc() == Bytecodes::_invokedynamic) {
@@ -658,22 +660,12 @@
       trap(str, unloaded_holder, str->get_method_holder_index());
     }
   } else {
-    // TODO Use Bytecode_invoke after metadata changes.
-    //Bytecode_invoke inv(str->method(), str->cur_bci());
-    //const bool has_receiver = callee->is_loaded() ? !callee->is_static() : inv.has_receiver();
-    Bytecode inv(str);
-    Bytecodes::Code code = inv.invoke_code();
-    const bool has_receiver = callee->is_loaded() ? !callee->is_static() : code != Bytecodes::_invokestatic && code != Bytecodes::_invokedynamic;
-
-    ciSignature* signature = callee->signature();
-    ciSignatureStream sigstr(signature);
-    // Push appendix argument, if one.
-    if (str->has_appendix()) {
-      ciObject* appendix = str->get_appendix();
-      push_object(appendix->klass());
-    }
-    int arg_size = signature->size();
-    int stack_base = stack_size() - arg_size;
+    // We are using the declared signature here because it might be
+    // different from the callee signature (Cf. invokedynamic and
+    // invokehandle).
+    ciSignatureStream sigstr(declared_signature);
+    const int arg_size = declared_signature->size();
+    const int stack_base = stack_size() - arg_size;
     int i = 0;
     for( ; !sigstr.at_return_type(); sigstr.next()) {
       ciType* type = sigstr.type();
@@ -689,7 +681,6 @@
     for (int j = 0; j < arg_size; j++) {
       pop();
     }
-    assert(!callee->is_loaded() || has_receiver == !callee->is_static(), "mismatch");
     if (has_receiver) {
       // Check this?
       pop_object();
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Wed Sep 05 12:00:30 2012 -0700
@@ -1246,6 +1246,31 @@
   heap_region_iterate(&cl);
 }
 
+double G1CollectedHeap::verify(bool guard, const char* msg) {
+  double verify_time_ms = 0.0;
+
+  if (guard && total_collections() >= VerifyGCStartAt) {
+    double verify_start = os::elapsedTime();
+    HandleMark hm;  // Discard invalid handles created during verification
+    gclog_or_tty->print(msg);
+    prepare_for_verify();
+    Universe::verify(false /* silent */, VerifyOption_G1UsePrevMarking);
+    verify_time_ms = (os::elapsedTime() - verify_start) * 1000;
+  }
+
+  return verify_time_ms;
+}
+
+void G1CollectedHeap::verify_before_gc() {
+  double verify_time_ms = verify(VerifyBeforeGC, " VerifyBeforeGC:");
+  g1_policy()->phase_times()->record_verify_before_time_ms(verify_time_ms);
+}
+
+void G1CollectedHeap::verify_after_gc() {
+  double verify_time_ms = verify(VerifyAfterGC, " VerifyAfterGC:");
+  g1_policy()->phase_times()->record_verify_after_time_ms(verify_time_ms);
+}
+
 bool G1CollectedHeap::do_collection(bool explicit_gc,
                                     bool clear_all_soft_refs,
                                     size_t word_size) {
@@ -1304,14 +1329,8 @@
     size_t g1h_prev_used = used();
     assert(used() == recalculate_used(), "Should be equal");
 
-    if (VerifyBeforeGC && total_collections() >= VerifyGCStartAt) {
-      HandleMark hm;  // Discard invalid handles created during verification
-      gclog_or_tty->print(" VerifyBeforeGC:");
-      prepare_for_verify();
-      Universe::verify(/* silent      */ false,
-                       /* option      */ VerifyOption_G1UsePrevMarking);
-
-    }
+    verify_before_gc();
+
     pre_full_gc_dump();
 
     COMPILER2_PRESENT(DerivedPointerTable::clear());
@@ -1378,14 +1397,7 @@
 
     MemoryService::track_memory_usage();
 
-    if (VerifyAfterGC && total_collections() >= VerifyGCStartAt) {
-      HandleMark hm;  // Discard invalid handles created during verification
-      gclog_or_tty->print(" VerifyAfterGC:");
-      prepare_for_verify();
-      Universe::verify(/* silent      */ false,
-                       /* option      */ VerifyOption_G1UsePrevMarking);
-
-    }
+    verify_after_gc();
 
     assert(!ref_processor_stw()->discovery_enabled(), "Postcondition");
     ref_processor_stw()->verify_no_references_recorded();
@@ -1933,6 +1945,9 @@
 
   clear_cset_start_regions();
 
+  // Initialize the G1EvacuationFailureALot counters and flags.
+  NOT_PRODUCT(reset_evacuation_should_fail();)
+
   guarantee(_task_queues != NULL, "task_queues allocation failure.");
 #ifdef SPARC
   // Issue a stern warning, but allow use for experimentation and debugging.
@@ -2327,8 +2342,7 @@
   while (dcqs.apply_closure_to_completed_buffer(cl, worker_i, 0, true)) {
     n_completed_buffers++;
   }
-  g1_policy()->phase_times()->record_update_rs_processed_buffers(worker_i,
-                                                  (double) n_completed_buffers);
+  g1_policy()->phase_times()->record_update_rs_processed_buffers(worker_i, n_completed_buffers);
   dcqs.clear_n_completed_buffers();
   assert(!dcqs.completed_buffers_exist_dirty(), "Completed buffers exist!");
 }
@@ -3735,8 +3749,9 @@
 
     int active_workers = (G1CollectedHeap::use_parallel_gc_threads() ?
                                 workers()->active_workers() : 1);
-    g1_policy()->phase_times()->note_gc_start(os::elapsedTime(), active_workers,
-      g1_policy()->gcs_are_young(), g1_policy()->during_initial_mark_pause(), gc_cause());
+    double pause_start_sec = os::elapsedTime();
+    g1_policy()->phase_times()->note_gc_start(active_workers);
+    bool initial_mark_gc = g1_policy()->during_initial_mark_pause();
 
     TraceCollectorStats tcs(g1mm()->incremental_collection_counters());
     TraceMemoryManagerStats tms(false /* fullGC */, gc_cause());
@@ -3765,13 +3780,7 @@
       increment_total_collections(false /* full gc */);
       increment_gc_time_stamp();
 
-      if (VerifyBeforeGC && total_collections() >= VerifyGCStartAt) {
-        HandleMark hm;  // Discard invalid handles created during verification
-        gclog_or_tty->print(" VerifyBeforeGC:");
-        prepare_for_verify();
-        Universe::verify(/* silent      */ false,
-                         /* option      */ VerifyOption_G1UsePrevMarking);
-      }
+      verify_before_gc();
 
       COMPILER2_PRESENT(DerivedPointerTable::clear());
 
@@ -3984,10 +3993,6 @@
                                  true  /* verify_fingers */);
         _cm->note_end_of_gc();
 
-        // Collect thread local data to allow the ergonomics to use
-        // the collected information
-        g1_policy()->phase_times()->collapse_par_times();
-
         // This timing is only used by the ergonomics to handle our pause target.
         // It is unclear why this should not include the full pause. We will
         // investigate this in CR 7178365.
@@ -4020,13 +4025,7 @@
         // scanning cards (see CR 7039627).
         increment_gc_time_stamp();
 
-        if (VerifyAfterGC && total_collections() >= VerifyGCStartAt) {
-          HandleMark hm;  // Discard invalid handles created during verification
-          gclog_or_tty->print(" VerifyAfterGC:");
-          prepare_for_verify();
-          Universe::verify(/* silent      */ false,
-                           /* option      */ VerifyOption_G1UsePrevMarking);
-        }
+        verify_after_gc();
 
         assert(!ref_processor_stw()->discovery_enabled(), "Postcondition");
         ref_processor_stw()->verify_no_references_recorded();
@@ -4050,10 +4049,35 @@
 
       gc_epilogue(false);
 
-      g1_policy()->phase_times()->note_gc_end(os::elapsedTime());
-
-      // We have to do this after we decide whether to expand the heap or not.
+      if (G1Log::fine()) {
+        if (PrintGCTimeStamps) {
+          gclog_or_tty->stamp();
+          gclog_or_tty->print(": ");
+        }
+
+        GCCauseString gc_cause_str = GCCauseString("GC pause", gc_cause())
+          .append(g1_policy()->gcs_are_young() ? " (young)" : " (mixed)")
+          .append(initial_mark_gc ? " (initial-mark)" : "");
+
+        double pause_time_sec = os::elapsedTime() - pause_start_sec;
+
+        if (G1Log::finer()) {
+          if (evacuation_failed()) {
+            gc_cause_str.append(" (to-space exhausted)");
+          }
+          gclog_or_tty->print_cr("[%s, %3.7f secs]", (const char*)gc_cause_str, pause_time_sec);
+          g1_policy()->phase_times()->note_gc_end();
+          g1_policy()->phase_times()->print(pause_time_sec);
+          g1_policy()->print_detailed_heap_transition();
+        } else {
+          if (evacuation_failed()) {
+            gc_cause_str.append("--");
+          }
+          gclog_or_tty->print("[%s", (const char*)gc_cause_str);
       g1_policy()->print_heap_transition();
+          gclog_or_tty->print_cr(", %3.7f secs]", pause_time_sec);
+        }
+      }
     }
 
     // It is not yet to safe to tell the concurrent mark to
@@ -4543,7 +4567,15 @@
   GCAllocPurpose alloc_purpose = g1p->evacuation_destination(from_region, age,
                                                              word_sz);
   HeapWord* obj_ptr = _par_scan_state->allocate(alloc_purpose, word_sz);
-  oop       obj     = oop(obj_ptr);
+#ifndef PRODUCT
+  // Should this evacuation fail?
+  if (_g1->evacuation_should_fail()) {
+    if (obj_ptr != NULL) {
+      _par_scan_state->undo_allocation(alloc_purpose, obj_ptr, word_sz);
+      obj_ptr = NULL;
+    }
+  }
+#endif // !PRODUCT
 
   if (obj_ptr == NULL) {
     // This will either forward-to-self, or detect that someone else has
@@ -4552,6 +4584,8 @@
     return _g1->handle_evacuation_failure_par(cl, old);
   }
 
+  oop obj = oop(obj_ptr);
+
   // We're going to allocate linearly, so might as well prefetch ahead.
   Prefetch::write(obj_ptr, PrefetchCopyIntervalInBytes);
 
@@ -4863,7 +4897,7 @@
         evac.do_void();
         double elapsed_ms = (os::elapsedTime()-start)*1000.0;
         double term_ms = pss.term_time()*1000.0;
-        _g1h->g1_policy()->phase_times()->record_obj_copy_time(worker_id, elapsed_ms-term_ms);
+        _g1h->g1_policy()->phase_times()->add_obj_copy_time(worker_id, elapsed_ms-term_ms);
         _g1h->g1_policy()->phase_times()->record_termination(worker_id, term_ms, pss.term_attempts());
       }
       _g1h->g1_policy()->record_thread_age_table(pss.age_table());
@@ -4991,27 +5025,28 @@
   buf_scan_non_heap_roots.done();
   buf_scan_perm.done();
 
-  double ext_roots_end = os::elapsedTime();
-
-  g1_policy()->phase_times()->reset_obj_copy_time(worker_i);
   double obj_copy_time_sec = buf_scan_perm.closure_app_seconds() +
                                 buf_scan_non_heap_roots.closure_app_seconds();
   g1_policy()->phase_times()->record_obj_copy_time(worker_i, obj_copy_time_sec * 1000.0);
 
   double ext_root_time_ms =
-    ((ext_roots_end - ext_roots_start) - obj_copy_time_sec) * 1000.0;
+    ((os::elapsedTime() - ext_roots_start) - obj_copy_time_sec) * 1000.0;
 
   g1_policy()->phase_times()->record_ext_root_scan_time(worker_i, ext_root_time_ms);
 
   // During conc marking we have to filter the per-thread SATB buffers
   // to make sure we remove any oops into the CSet (which will show up
   // as implicitly live).
+  double satb_filtering_ms = 0.0;
   if (!_process_strong_tasks->is_task_claimed(G1H_PS_filter_satb_buffers)) {
     if (mark_in_progress()) {
+      double satb_filter_start = os::elapsedTime();
+
       JavaThread::satb_mark_queue_set().filter_thread_buffers();
+
+      satb_filtering_ms = (os::elapsedTime() - satb_filter_start) * 1000.0;
     }
   }
-  double satb_filtering_ms = (os::elapsedTime() - ext_roots_end) * 1000.0;
   g1_policy()->phase_times()->record_satb_filtering_time(worker_i, satb_filtering_ms);
 
   // Now scan the complement of the collection set.
@@ -5556,6 +5591,9 @@
   _expand_heap_after_alloc_failure = true;
   set_evacuation_failed(false);
 
+  // Should G1EvacuationFailureALot be in effect for this GC?
+  NOT_PRODUCT(set_evacuation_failure_alot_for_current_gc();)
+
   g1_rem_set()->prepare_for_oops_into_collection_set_do();
   concurrent_g1_refine()->set_use_cache(false);
   concurrent_g1_refine()->clear_hot_cache_claimed_index();
@@ -5647,11 +5685,11 @@
 
   if (evacuation_failed()) {
     remove_self_forwarding_pointers();
-    if (G1Log::finer()) {
-      gclog_or_tty->print(" (to-space exhausted)");
-    } else if (G1Log::fine()) {
-      gclog_or_tty->print("--");
-    }
+
+    // Reset the G1EvacuationFailureALot counters and flags
+    // Note: the values are reset only when an actual
+    // evacuation failure occurs.
+    NOT_PRODUCT(reset_evacuation_should_fail();)
   }
 
   // Enqueue any remaining references remaining on the STW
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp	Wed Sep 05 12:00:30 2012 -0700
@@ -405,6 +405,10 @@
   // heap after a compaction.
   void print_hrs_post_compaction();
 
+  double verify(bool guard, const char* msg);
+  void verify_before_gc();
+  void verify_after_gc();
+
   // These are macros so that, if the assert fires, we get the correct
   // line number, file, etc.
 
@@ -911,6 +915,39 @@
   oop handle_evacuation_failure_par(OopsInHeapRegionClosure* cl, oop obj);
   void handle_evacuation_failure_common(oop obj, markOop m);
 
+#ifndef PRODUCT
+  // Support for forcing evacuation failures. Analogous to
+  // PromotionFailureALot for the other collectors.
+
+  // Records whether G1EvacuationFailureALot should be in effect
+  // for the current GC
+  bool _evacuation_failure_alot_for_current_gc;
+
+  // Used to record the GC number for interval checking when
+  // determining whether G1EvaucationFailureALot is in effect
+  // for the current GC.
+  size_t _evacuation_failure_alot_gc_number;
+
+  // Count of the number of evacuations between failures.
+  volatile size_t _evacuation_failure_alot_count;
+
+  // Set whether G1EvacuationFailureALot should be in effect
+  // for the current GC (based upon the type of GC and which
+  // command line flags are set);
+  inline bool evacuation_failure_alot_for_gc_type(bool gcs_are_young,
+                                                  bool during_initial_mark,
+                                                  bool during_marking);
+
+  inline void set_evacuation_failure_alot_for_current_gc();
+
+  // Return true if it's time to cause an evacuation failure.
+  inline bool evacuation_should_fail();
+
+  // Reset the G1EvacuationFailureALot counters.  Should be called at
+  // the end of an evacuation pause in which an evacuation failure ocurred.
+  inline void reset_evacuation_should_fail();
+#endif // !PRODUCT
+
   // ("Weak") Reference processing support.
   //
   // G1 has 2 instances of the referece processor class. One
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp	Wed Sep 05 12:00:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -138,7 +138,7 @@
   return _task_queues->queue(i);
 }
 
-inline  bool G1CollectedHeap::isMarkedPrev(oop obj) const {
+inline bool G1CollectedHeap::isMarkedPrev(oop obj) const {
   return _cm->prevMarkBitMap()->isMarked((HeapWord *)obj);
 }
 
@@ -146,4 +146,77 @@
   return _cm->nextMarkBitMap()->isMarked((HeapWord *)obj);
 }
 
+#ifndef PRODUCT
+// Support for G1EvacuationFailureALot
+
+inline bool
+G1CollectedHeap::evacuation_failure_alot_for_gc_type(bool gcs_are_young,
+                                                     bool during_initial_mark,
+                                                     bool during_marking) {
+  bool res = false;
+  if (during_marking) {
+    res |= G1EvacuationFailureALotDuringConcMark;
+  }
+  if (during_initial_mark) {
+    res |= G1EvacuationFailureALotDuringInitialMark;
+  }
+  if (gcs_are_young) {
+    res |= G1EvacuationFailureALotDuringYoungGC;
+  } else {
+    // GCs are mixed
+    res |= G1EvacuationFailureALotDuringMixedGC;
+  }
+  return res;
+}
+
+inline void
+G1CollectedHeap::set_evacuation_failure_alot_for_current_gc() {
+  if (G1EvacuationFailureALot) {
+    // Note we can't assert that _evacuation_failure_alot_for_current_gc
+    // is clear here. It may have been set during a previous GC but that GC
+    // did not copy enough objects (i.e. G1EvacuationFailureALotCount) to
+    // trigger an evacuation failure and clear the flags and and counts.
+
+    // Check if we have gone over the interval.
+    const size_t gc_num = total_collections();
+    const size_t elapsed_gcs = gc_num - _evacuation_failure_alot_gc_number;
+
+    _evacuation_failure_alot_for_current_gc = (elapsed_gcs >= G1EvacuationFailureALotInterval);
+
+    // Now check if G1EvacuationFailureALot is enabled for the current GC type.
+    const bool gcs_are_young = g1_policy()->gcs_are_young();
+    const bool during_im = g1_policy()->during_initial_mark_pause();
+    const bool during_marking = mark_in_progress();
+
+    _evacuation_failure_alot_for_current_gc &=
+      evacuation_failure_alot_for_gc_type(gcs_are_young,
+                                          during_im,
+                                          during_marking);
+  }
+}
+
+inline bool
+G1CollectedHeap::evacuation_should_fail() {
+  if (!G1EvacuationFailureALot || !_evacuation_failure_alot_for_current_gc) {
+    return false;
+  }
+  // G1EvacuationFailureALot is in effect for current GC
+  // Access to _evacuation_failure_alot_count is not atomic;
+  // the value does not have to be exact.
+  if (++_evacuation_failure_alot_count < G1EvacuationFailureALotCount) {
+    return false;
+  }
+  _evacuation_failure_alot_count = 0;
+  return true;
+}
+
+inline void G1CollectedHeap::reset_evacuation_should_fail() {
+  if (G1EvacuationFailureALot) {
+    _evacuation_failure_alot_gc_number = total_collections();
+    _evacuation_failure_alot_count = 0;
+    _evacuation_failure_alot_for_current_gc = false;
+  }
+}
+#endif  // #ifndef PRODUCT
+
 #endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1COLLECTEDHEAP_INLINE_HPP
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp	Wed Sep 05 12:00:30 2012 -0700
@@ -795,7 +795,7 @@
   _trace_gen0_time_data.record_start_collection(s_w_t_ms);
   _stop_world_start = 0.0;
 
-  phase_times()->_cur_collection_start_sec = start_time_sec;
+  phase_times()->record_cur_collection_start_sec(start_time_sec);
   _cur_collection_pause_used_at_start_bytes = start_used;
   _cur_collection_pause_used_regions_at_start = _g1->used_regions();
   _pending_cards = _g1->pending_card_num();
@@ -947,7 +947,7 @@
     _trace_gen0_time_data.record_end_collection(pause_time_ms, phase_times());
     // this is where we update the allocation rate of the application
     double app_time_ms =
-      (phase_times()->_cur_collection_start_sec * 1000.0 - _prev_collection_pause_end_ms);
+      (phase_times()->cur_collection_start_sec() * 1000.0 - _prev_collection_pause_end_ms);
     if (app_time_ms < MIN_TIMER_GRANULARITY) {
       // This usually happens due to the timer not having the required
       // granularity. Some Linuxes are the usual culprits.
@@ -1035,7 +1035,7 @@
   if (update_stats) {
     double cost_per_card_ms = 0.0;
     if (_pending_cards > 0) {
-      cost_per_card_ms = phase_times()->_update_rs_time / (double) _pending_cards;
+      cost_per_card_ms = phase_times()->average_last_update_rs_time() / (double) _pending_cards;
       _cost_per_card_ms_seq->add(cost_per_card_ms);
     }
 
@@ -1043,7 +1043,7 @@
 
     double cost_per_entry_ms = 0.0;
     if (cards_scanned > 10) {
-      cost_per_entry_ms = phase_times()->_scan_rs_time / (double) cards_scanned;
+      cost_per_entry_ms = phase_times()->average_last_scan_rs_time() / (double) cards_scanned;
       if (_last_gc_was_young) {
         _cost_per_entry_ms_seq->add(cost_per_entry_ms);
       } else {
@@ -1083,7 +1083,7 @@
     size_t copied_bytes = surviving_bytes;
     double cost_per_byte_ms = 0.0;
     if (copied_bytes > 0) {
-      cost_per_byte_ms = phase_times()->_obj_copy_time / (double) copied_bytes;
+      cost_per_byte_ms = phase_times()->average_last_obj_copy_time() / (double) copied_bytes;
       if (_in_marking_window) {
         _cost_per_byte_ms_during_cm_seq->add(cost_per_byte_ms);
       } else {
@@ -1092,21 +1092,22 @@
     }
 
     double all_other_time_ms = pause_time_ms -
-      (phase_times()->_update_rs_time + phase_times()->_scan_rs_time + phase_times()->_obj_copy_time + phase_times()->_termination_time);
+      (phase_times()->average_last_update_rs_time() + phase_times()->average_last_scan_rs_time()
+      + phase_times()->average_last_obj_copy_time() + phase_times()->average_last_termination_time());
 
     double young_other_time_ms = 0.0;
     if (young_cset_region_length() > 0) {
       young_other_time_ms =
-        phase_times()->_recorded_young_cset_choice_time_ms +
-        phase_times()->_recorded_young_free_cset_time_ms;
+        phase_times()->young_cset_choice_time_ms() +
+        phase_times()->young_free_cset_time_ms();
       _young_other_cost_per_region_ms_seq->add(young_other_time_ms /
                                           (double) young_cset_region_length());
     }
     double non_young_other_time_ms = 0.0;
     if (old_cset_region_length() > 0) {
       non_young_other_time_ms =
-        phase_times()->_recorded_non_young_cset_choice_time_ms +
-        phase_times()->_recorded_non_young_free_cset_time_ms;
+        phase_times()->non_young_cset_choice_time_ms() +
+        phase_times()->non_young_free_cset_time_ms();
 
       _non_young_other_cost_per_region_ms_seq->add(non_young_other_time_ms /
                                             (double) old_cset_region_length());
@@ -1133,7 +1134,8 @@
 
   // Note that _mmu_tracker->max_gc_time() returns the time in seconds.
   double update_rs_time_goal_ms = _mmu_tracker->max_gc_time() * MILLIUNITS * G1RSetUpdatingPauseTimePercent / 100.0;
-  adjust_concurrent_refinement(phase_times()->_update_rs_time, phase_times()->_update_rs_processed_buffers, update_rs_time_goal_ms);
+  adjust_concurrent_refinement(phase_times()->average_last_update_rs_time(),
+                               phase_times()->sum_last_update_rs_processed_buffers(), update_rs_time_goal_ms);
 
   _collectionSetChooser->verify();
 }
@@ -1144,7 +1146,11 @@
   proper_unit_for_byte_size((bytes))
 
 void G1CollectorPolicy::print_heap_transition() {
-  if (G1Log::finer()) {
+  _g1->print_size_transition(gclog_or_tty,
+    _cur_collection_pause_used_at_start_bytes, _g1->used(), _g1->capacity());
+}
+
+void G1CollectorPolicy::print_detailed_heap_transition() {
     YoungList* young_list = _g1->young_list();
     size_t eden_bytes = young_list->eden_used_bytes();
     size_t survivor_bytes = young_list->survivor_used_bytes();
@@ -1171,11 +1177,6 @@
       EXT_SIZE_PARAMS(capacity));
 
     _prev_eden_capacity = eden_capacity;
-  } else if (G1Log::fine()) {
-    _g1->print_size_transition(gclog_or_tty,
-                               _cur_collection_pause_used_at_start_bytes,
-                               _g1->used(), _g1->capacity());
-  }
 }
 
 void G1CollectorPolicy::adjust_concurrent_refinement(double update_rs_time,
@@ -1900,8 +1901,7 @@
   set_recorded_rs_lengths(_inc_cset_recorded_rs_lengths);
 
   double young_end_time_sec = os::elapsedTime();
-  phase_times()->_recorded_young_cset_choice_time_ms =
-    (young_end_time_sec - young_start_time_sec) * 1000.0;
+  phase_times()->record_young_cset_choice_time_ms((young_end_time_sec - young_start_time_sec) * 1000.0);
 
   // Set the start of the non-young choice time.
   double non_young_start_time_sec = young_end_time_sec;
@@ -2015,8 +2015,7 @@
                 predicted_pause_time_ms, target_pause_time_ms);
 
   double non_young_end_time_sec = os::elapsedTime();
-  phase_times()->_recorded_non_young_cset_choice_time_ms =
-    (non_young_end_time_sec - non_young_start_time_sec) * 1000.0;
+  phase_times()->record_non_young_cset_choice_time_ms((non_young_end_time_sec - non_young_start_time_sec) * 1000.0);
 }
 
 void TraceGen0TimeData::record_start_collection(double time_to_stop_the_world_ms) {
@@ -2035,25 +2034,25 @@
   if(TraceGen0Time) {
     _total.add(pause_time_ms);
     _other.add(pause_time_ms - phase_times->accounted_time_ms());
-    _root_region_scan_wait.add(phase_times->_root_region_scan_wait_time_ms);
-    _parallel.add(phase_times->_cur_collection_par_time_ms);
-    _ext_root_scan.add(phase_times->_ext_root_scan_time);
-    _satb_filtering.add(phase_times->_satb_filtering_time);
-    _update_rs.add(phase_times->_update_rs_time);
-    _scan_rs.add(phase_times->_scan_rs_time);
-    _obj_copy.add(phase_times->_obj_copy_time);
-    _termination.add(phase_times->_termination_time);
+    _root_region_scan_wait.add(phase_times->root_region_scan_wait_time_ms());
+    _parallel.add(phase_times->cur_collection_par_time_ms());
+    _ext_root_scan.add(phase_times->average_last_ext_root_scan_time());
+    _satb_filtering.add(phase_times->average_last_satb_filtering_times_ms());
+    _update_rs.add(phase_times->average_last_update_rs_time());
+    _scan_rs.add(phase_times->average_last_scan_rs_time());
+    _obj_copy.add(phase_times->average_last_obj_copy_time());
+    _termination.add(phase_times->average_last_termination_time());
 
-    double parallel_known_time = phase_times->_ext_root_scan_time +
-      phase_times->_satb_filtering_time +
-      phase_times->_update_rs_time +
-      phase_times->_scan_rs_time +
-      phase_times->_obj_copy_time +
-      + phase_times->_termination_time;
+    double parallel_known_time = phase_times->average_last_ext_root_scan_time() +
+      phase_times->average_last_satb_filtering_times_ms() +
+      phase_times->average_last_update_rs_time() +
+      phase_times->average_last_scan_rs_time() +
+      phase_times->average_last_obj_copy_time() +
+      + phase_times->average_last_termination_time();
 
-    double parallel_other_time = phase_times->_cur_collection_par_time_ms - parallel_known_time;
+    double parallel_other_time = phase_times->cur_collection_par_time_ms() - parallel_known_time;
     _parallel_other.add(parallel_other_time);
-    _clear_ct.add(phase_times->_cur_clear_ct_time_ms);
+    _clear_ct.add(phase_times->cur_clear_ct_time_ms());
   }
 }
 
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp	Wed Sep 05 12:00:30 2012 -0700
@@ -683,6 +683,7 @@
 
   void record_collection_pause_end(double pause_time);
   void print_heap_transition();
+  void print_detailed_heap_transition();
 
   // Record the fact that a full collection occurred.
   void record_full_collection_start();
--- a/hotspot/src/share/vm/gc_implementation/g1/g1GCPhaseTimes.cpp	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1GCPhaseTimes.cpp	Wed Sep 05 12:00:30 2012 -0700
@@ -79,119 +79,145 @@
   }
 };
 
+template <class T>
+void WorkerDataArray<T>::print(int level, const char* title) {
+  if (_length == 1) {
+    // No need for min, max, average and sum for only one worker
+    LineBuffer buf(level);
+    buf.append("[%s:  ", title);
+    buf.append(_print_format, _data[0]);
+    buf.append_and_print_cr("]");
+    return;
+  }
+
+  T min = _data[0];
+  T max = _data[0];
+  T sum = 0;
+
+  LineBuffer buf(level);
+  buf.append("[%s:", title);
+  for (uint i = 0; i < _length; ++i) {
+    T val = _data[i];
+    min = MIN2(val, min);
+    max = MAX2(val, max);
+    sum += val;
+    if (G1Log::finest()) {
+      buf.append("  ");
+      buf.append(_print_format, val);
+    }
+  }
+
+  if (G1Log::finest()) {
+    buf.append_and_print_cr("");
+  }
+
+  double avg = (double)sum / (double)_length;
+  buf.append(" Min: ");
+  buf.append(_print_format, min);
+  buf.append(", Avg: ");
+  buf.append("%.1lf", avg); // Always print average as a double
+  buf.append(", Max: ");
+  buf.append(_print_format, max);
+  buf.append(", Diff: ");
+  buf.append(_print_format, max - min);
+  if (_print_sum) {
+    // for things like the start and end times the sum is not
+    // that relevant
+    buf.append(", Sum: ");
+    buf.append(_print_format, sum);
+  }
+  buf.append_and_print_cr("]");
+}
+
+#ifdef ASSERT
+
+template <class T>
+void WorkerDataArray<T>::reset() {
+  for (uint i = 0; i < _length; i++) {
+    _data[i] = (T)-1;
+  }
+}
+
+template <class T>
+void WorkerDataArray<T>::verify() {
+  for (uint i = 0; i < _length; i++) {
+    assert(_data[i] >= (T)0, err_msg("Invalid data for worker %d", i));
+  }
+}
+
+#endif
+
 G1GCPhaseTimes::G1GCPhaseTimes(uint max_gc_threads) :
   _max_gc_threads(max_gc_threads),
   _min_clear_cc_time_ms(-1.0),
   _max_clear_cc_time_ms(-1.0),
   _cur_clear_cc_time_ms(0.0),
   _cum_clear_cc_time_ms(0.0),
-  _num_cc_clears(0L)
+  _num_cc_clears(0L),
+  _last_gc_worker_start_times_ms(_max_gc_threads, "%.1lf", false),
+  _last_ext_root_scan_times_ms(_max_gc_threads, "%.1lf"),
+  _last_satb_filtering_times_ms(_max_gc_threads, "%.1lf"),
+  _last_update_rs_times_ms(_max_gc_threads, "%.1lf"),
+  _last_update_rs_processed_buffers(_max_gc_threads, "%d"),
+  _last_scan_rs_times_ms(_max_gc_threads, "%.1lf"),
+  _last_obj_copy_times_ms(_max_gc_threads, "%.1lf"),
+  _last_termination_times_ms(_max_gc_threads, "%.1lf"),
+  _last_termination_attempts(_max_gc_threads, SIZE_FORMAT),
+  _last_gc_worker_end_times_ms(_max_gc_threads, "%.1lf", false),
+  _last_gc_worker_times_ms(_max_gc_threads, "%.1lf"),
+  _last_gc_worker_other_times_ms(_max_gc_threads, "%.1lf")
 {
   assert(max_gc_threads > 0, "Must have some GC threads");
-  _par_last_gc_worker_start_times_ms = new double[_max_gc_threads];
-  _par_last_ext_root_scan_times_ms = new double[_max_gc_threads];
-  _par_last_satb_filtering_times_ms = new double[_max_gc_threads];
-  _par_last_update_rs_times_ms = new double[_max_gc_threads];
-  _par_last_update_rs_processed_buffers = new double[_max_gc_threads];
-  _par_last_scan_rs_times_ms = new double[_max_gc_threads];
-  _par_last_obj_copy_times_ms = new double[_max_gc_threads];
-  _par_last_termination_times_ms = new double[_max_gc_threads];
-  _par_last_termination_attempts = new double[_max_gc_threads];
-  _par_last_gc_worker_end_times_ms = new double[_max_gc_threads];
-  _par_last_gc_worker_times_ms = new double[_max_gc_threads];
-  _par_last_gc_worker_other_times_ms = new double[_max_gc_threads];
 }
 
-void G1GCPhaseTimes::note_gc_start(double pause_start_time_sec, uint active_gc_threads,
-  bool is_young_gc, bool is_initial_mark_gc, GCCause::Cause gc_cause) {
+void G1GCPhaseTimes::note_gc_start(uint active_gc_threads) {
   assert(active_gc_threads > 0, "The number of threads must be > 0");
   assert(active_gc_threads <= _max_gc_threads, "The number of active threads must be <= the max nubmer of threads");
   _active_gc_threads = active_gc_threads;
-  _pause_start_time_sec = pause_start_time_sec;
-  _is_young_gc = is_young_gc;
-  _is_initial_mark_gc = is_initial_mark_gc;
-  _gc_cause = gc_cause;
 
-#ifdef ASSERT
-  // initialise the timing data to something well known so that we can spot
-  // if something is not set properly
-
-  for (uint i = 0; i < _max_gc_threads; ++i) {
-    _par_last_gc_worker_start_times_ms[i] = -1234.0;
-    _par_last_ext_root_scan_times_ms[i] = -1234.0;
-    _par_last_satb_filtering_times_ms[i] = -1234.0;
-    _par_last_update_rs_times_ms[i] = -1234.0;
-    _par_last_update_rs_processed_buffers[i] = -1234.0;
-    _par_last_scan_rs_times_ms[i] = -1234.0;
-    _par_last_obj_copy_times_ms[i] = -1234.0;
-    _par_last_termination_times_ms[i] = -1234.0;
-    _par_last_termination_attempts[i] = -1234.0;
-    _par_last_gc_worker_end_times_ms[i] = -1234.0;
-    _par_last_gc_worker_times_ms[i] = -1234.0;
-    _par_last_gc_worker_other_times_ms[i] = -1234.0;
-  }
-#endif
+  _last_gc_worker_start_times_ms.reset();
+  _last_ext_root_scan_times_ms.reset();
+  _last_satb_filtering_times_ms.reset();
+  _last_update_rs_times_ms.reset();
+  _last_update_rs_processed_buffers.reset();
+  _last_scan_rs_times_ms.reset();
+  _last_obj_copy_times_ms.reset();
+  _last_termination_times_ms.reset();
+  _last_termination_attempts.reset();
+  _last_gc_worker_end_times_ms.reset();
+  _last_gc_worker_times_ms.reset();
+  _last_gc_worker_other_times_ms.reset();
 }
 
-void G1GCPhaseTimes::note_gc_end(double pause_end_time_sec) {
-  if (G1Log::fine()) {
-    double pause_time_ms = (pause_end_time_sec - _pause_start_time_sec) * MILLIUNITS;
+void G1GCPhaseTimes::note_gc_end() {
+  _last_gc_worker_start_times_ms.verify();
+  _last_ext_root_scan_times_ms.verify();
+  _last_satb_filtering_times_ms.verify();
+  _last_update_rs_times_ms.verify();
+  _last_update_rs_processed_buffers.verify();
+  _last_scan_rs_times_ms.verify();
+  _last_obj_copy_times_ms.verify();
+  _last_termination_times_ms.verify();
+  _last_termination_attempts.verify();
+  _last_gc_worker_end_times_ms.verify();
 
     for (uint i = 0; i < _active_gc_threads; i++) {
-      _par_last_gc_worker_times_ms[i] = _par_last_gc_worker_end_times_ms[i] -
-        _par_last_gc_worker_start_times_ms[i];
+      double worker_time = _last_gc_worker_end_times_ms.get(i) - _last_gc_worker_start_times_ms.get(i);
+      _last_gc_worker_times_ms.set(i, worker_time);
 
-      double worker_known_time = _par_last_ext_root_scan_times_ms[i] +
-        _par_last_satb_filtering_times_ms[i] +
-        _par_last_update_rs_times_ms[i] +
-        _par_last_scan_rs_times_ms[i] +
-        _par_last_obj_copy_times_ms[i] +
-        _par_last_termination_times_ms[i];
+      double worker_known_time = _last_ext_root_scan_times_ms.get(i) +
+        _last_satb_filtering_times_ms.get(i) +
+        _last_update_rs_times_ms.get(i) +
+        _last_scan_rs_times_ms.get(i) +
+        _last_obj_copy_times_ms.get(i) +
+        _last_termination_times_ms.get(i);
 
-      _par_last_gc_worker_other_times_ms[i] = _par_last_gc_worker_times_ms[i] -
-        worker_known_time;
+      double worker_other_time = worker_time - worker_known_time;
+      _last_gc_worker_other_times_ms.set(i, worker_other_time);
     }
 
-    print(pause_time_ms);
-  }
-
-}
-
-void G1GCPhaseTimes::print_par_stats(int level,
-                                        const char* str,
-                                        double* data,
-                                        bool showDecimals) {
-  double min = data[0], max = data[0];
-  double total = 0.0;
-  LineBuffer buf(level);
-  buf.append("[%s (ms):", str);
-  for (uint i = 0; i < _active_gc_threads; ++i) {
-    double val = data[i];
-    if (val < min)
-      min = val;
-    if (val > max)
-      max = val;
-    total += val;
-    if (G1Log::finest()) {
-      if (showDecimals) {
-        buf.append("  %.1lf", val);
-      } else {
-        buf.append("  %d", (int)val);
-      }
-    }
-  }
-
-  if (G1Log::finest()) {
-    buf.append_and_print_cr("");
-  }
-  double avg = total / (double) _active_gc_threads;
-  if (showDecimals) {
-    buf.append_and_print_cr(" Min: %.1lf, Avg: %.1lf, Max: %.1lf, Diff: %.1lf, Sum: %.1lf]",
-      min, avg, max, max - min, total);
-  } else {
-    buf.append_and_print_cr(" Min: %d, Avg: %d, Max: %d, Diff: %d, Sum: %d]",
-      (int)min, (int)avg, (int)max, (int)max - (int)min, (int)total);
-  }
+  _last_gc_worker_times_ms.verify();
+  _last_gc_worker_other_times_ms.verify();
 }
 
 void G1GCPhaseTimes::print_stats(int level, const char* str, double value) {
@@ -202,73 +228,6 @@
   LineBuffer(level).append_and_print_cr("[%s: %.1lf ms, GC Workers: %d]", str, value, workers);
 }
 
-void G1GCPhaseTimes::print_stats(int level, const char* str, int value) {
-  LineBuffer(level).append_and_print_cr("[%s: %d]", str, value);
-}
-
-double G1GCPhaseTimes::avg_value(double* data) {
-  if (G1CollectedHeap::use_parallel_gc_threads()) {
-    double ret = 0.0;
-    for (uint i = 0; i < _active_gc_threads; ++i) {
-      ret += data[i];
-    }
-    return ret / (double) _active_gc_threads;
-  } else {
-    return data[0];
-  }
-}
-
-double G1GCPhaseTimes::max_value(double* data) {
-  if (G1CollectedHeap::use_parallel_gc_threads()) {
-    double ret = data[0];
-    for (uint i = 1; i < _active_gc_threads; ++i) {
-      if (data[i] > ret) {
-        ret = data[i];
-      }
-    }
-    return ret;
-  } else {
-    return data[0];
-  }
-}
-
-double G1GCPhaseTimes::sum_of_values(double* data) {
-  if (G1CollectedHeap::use_parallel_gc_threads()) {
-    double sum = 0.0;
-    for (uint i = 0; i < _active_gc_threads; i++) {
-      sum += data[i];
-    }
-    return sum;
-  } else {
-    return data[0];
-  }
-}
-
-double G1GCPhaseTimes::max_sum(double* data1, double* data2) {
-  double ret = data1[0] + data2[0];
-
-  if (G1CollectedHeap::use_parallel_gc_threads()) {
-    for (uint i = 1; i < _active_gc_threads; ++i) {
-      double data = data1[i] + data2[i];
-      if (data > ret) {
-        ret = data;
-      }
-    }
-  }
-  return ret;
-}
-
-void G1GCPhaseTimes::collapse_par_times() {
-    _ext_root_scan_time = avg_value(_par_last_ext_root_scan_times_ms);
-    _satb_filtering_time = avg_value(_par_last_satb_filtering_times_ms);
-    _update_rs_time = avg_value(_par_last_update_rs_times_ms);
-    _update_rs_processed_buffers =
-      sum_of_values(_par_last_update_rs_processed_buffers);
-    _scan_rs_time = avg_value(_par_last_scan_rs_times_ms);
-    _obj_copy_time = avg_value(_par_last_obj_copy_times_ms);
-    _termination_time = avg_value(_par_last_termination_times_ms);
-}
-
 double G1GCPhaseTimes::accounted_time_ms() {
     // Subtract the root region scanning wait time. It's initialized to
     // zero at the start of the pause.
@@ -286,58 +245,37 @@
     return misc_time_ms;
 }
 
-void G1GCPhaseTimes::print(double pause_time_ms) {
-
-  if (PrintGCTimeStamps) {
-    gclog_or_tty->stamp();
-    gclog_or_tty->print(": ");
-  }
-
-  GCCauseString gc_cause_str = GCCauseString("GC pause", _gc_cause)
-    .append(_is_young_gc ? " (young)" : " (mixed)")
-    .append(_is_initial_mark_gc ? " (initial-mark)" : "");
-  gclog_or_tty->print_cr("[%s, %3.7f secs]", (const char*)gc_cause_str, pause_time_ms / 1000.0);
-
-  if (!G1Log::finer()) {
-    return;
-  }
-
+void G1GCPhaseTimes::print(double pause_time_sec) {
   if (_root_region_scan_wait_time_ms > 0.0) {
     print_stats(1, "Root Region Scan Waiting", _root_region_scan_wait_time_ms);
   }
   if (G1CollectedHeap::use_parallel_gc_threads()) {
     print_stats(1, "Parallel Time", _cur_collection_par_time_ms, _active_gc_threads);
-    print_par_stats(2, "GC Worker Start", _par_last_gc_worker_start_times_ms);
-    print_par_stats(2, "Ext Root Scanning", _par_last_ext_root_scan_times_ms);
-    if (_satb_filtering_time > 0.0) {
-      print_par_stats(2, "SATB Filtering", _par_last_satb_filtering_times_ms);
+    _last_gc_worker_start_times_ms.print(2, "GC Worker Start (ms)");
+    _last_ext_root_scan_times_ms.print(2, "Ext Root Scanning (ms)");
+    if (_last_satb_filtering_times_ms.sum() > 0.0) {
+      _last_satb_filtering_times_ms.print(2, "SATB Filtering (ms)");
     }
-    print_par_stats(2, "Update RS", _par_last_update_rs_times_ms);
+    _last_update_rs_times_ms.print(2, "Update RS (ms)");
+      _last_update_rs_processed_buffers.print(3, "Processed Buffers");
+    _last_scan_rs_times_ms.print(2, "Scan RS (ms)");
+    _last_obj_copy_times_ms.print(2, "Object Copy (ms)");
+    _last_termination_times_ms.print(2, "Termination (ms)");
     if (G1Log::finest()) {
-      print_par_stats(3, "Processed Buffers", _par_last_update_rs_processed_buffers,
-        false /* showDecimals */);
+      _last_termination_attempts.print(3, "Termination Attempts");
     }
-    print_par_stats(2, "Scan RS", _par_last_scan_rs_times_ms);
-    print_par_stats(2, "Object Copy", _par_last_obj_copy_times_ms);
-    print_par_stats(2, "Termination", _par_last_termination_times_ms);
-    if (G1Log::finest()) {
-      print_par_stats(3, "Termination Attempts", _par_last_termination_attempts,
-        false /* showDecimals */);
+    _last_gc_worker_other_times_ms.print(2, "GC Worker Other (ms)");
+    _last_gc_worker_times_ms.print(2, "GC Worker Total (ms)");
+    _last_gc_worker_end_times_ms.print(2, "GC Worker End (ms)");
+  } else {
+    _last_ext_root_scan_times_ms.print(1, "Ext Root Scanning (ms)");
+    if (_last_satb_filtering_times_ms.sum() > 0.0) {
+      _last_satb_filtering_times_ms.print(1, "SATB Filtering (ms)");
     }
-    print_par_stats(2, "GC Worker Other", _par_last_gc_worker_other_times_ms);
-    print_par_stats(2, "GC Worker Total", _par_last_gc_worker_times_ms);
-    print_par_stats(2, "GC Worker End", _par_last_gc_worker_end_times_ms);
-  } else {
-    print_stats(1, "Ext Root Scanning", _ext_root_scan_time);
-    if (_satb_filtering_time > 0.0) {
-      print_stats(1, "SATB Filtering", _satb_filtering_time);
-    }
-    print_stats(1, "Update RS", _update_rs_time);
-    if (G1Log::finest()) {
-      print_stats(2, "Processed Buffers", (int)_update_rs_processed_buffers);
-    }
-    print_stats(1, "Scan RS", _scan_rs_time);
-    print_stats(1, "Object Copying", _obj_copy_time);
+    _last_update_rs_times_ms.print(1, "Update RS (ms)");
+      _last_update_rs_processed_buffers.print(2, "Processed Buffers");
+    _last_scan_rs_times_ms.print(1, "Scan RS (ms)");
+    _last_obj_copy_times_ms.print(1, "Object Copy (ms)");
   }
   print_stats(1, "Code Root Fixup", _cur_collection_code_root_fixup_time_ms);
   print_stats(1, "Clear CT", _cur_clear_ct_time_ms);
@@ -350,8 +288,11 @@
       print_stats(1, "Avg Clear CC", _cum_clear_cc_time_ms / ((double)_num_cc_clears));
     }
   }
-  double misc_time_ms = pause_time_ms - accounted_time_ms();
+  double misc_time_ms = pause_time_sec * MILLIUNITS - accounted_time_ms();
   print_stats(1, "Other", misc_time_ms);
+  if (_cur_verify_before_time_ms > 0.0) {
+    print_stats(2, "Verify Before", _cur_verify_before_time_ms);
+  }
   print_stats(2, "Choose CSet",
     (_recorded_young_cset_choice_time_ms +
     _recorded_non_young_cset_choice_time_ms));
@@ -360,6 +301,9 @@
   print_stats(2, "Free CSet",
     (_recorded_young_free_cset_time_ms +
     _recorded_non_young_free_cset_time_ms));
+  if (_cur_verify_after_time_ms > 0.0) {
+    print_stats(2, "Verify After", _cur_verify_after_time_ms);
+  }
 }
 
 void G1GCPhaseTimes::record_cc_clear_time_ms(double ms) {
--- a/hotspot/src/share/vm/gc_implementation/g1/g1GCPhaseTimes.hpp	Wed Sep 05 08:32:32 2012 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1GCPhaseTimes.hpp	Wed Sep 05 12:00:30 2012 -0700
@@ -28,52 +28,109 @@
 #include "memory/allocation.hpp"
 #include "gc_interface/gcCause.hpp"
 
+template <class T>
+class WorkerDataArray  : public CHeapObj<mtGC> {
+  T*          _data;
+  uint        _length;
+  const char* _print_format;
+  bool        _print_sum;
+
+  // We are caching the sum and average to only have to calculate them once.
+  // This is not done in an MT-safe way. It is intetened to allow single
+  // threaded code to call sum() and average() multiple times in any order
+  // without having to worry about the cost.
+  bool   _has_new_data;
+  T      _sum;
+  double _average;
+
+ public:
+  WorkerDataArray(uint length, const char* print_format, bool print_sum = true) :
+  _length(length), _print_format(print_format), _print_sum(print_sum), _has_new_data(true) {
+    assert(length > 0, "Must have some workers to store data for");
+    _data = NEW_C_HEAP_ARRAY(T, _length, mtGC);
+  }
+
+  ~WorkerDataArray() {
+    FREE_C_HEAP_ARRAY(T, _data, mtGC);
+  }
+
+  void set(uint worker_i, T value) {
+    assert(worker_i < _length, err_msg("Worker %d is greater than max: %d", worker_i, _length));
+    assert(_data[worker_i] == (T)-1, err_msg("Overwriting data for worker %d", worker_i));
+    _data[worker_i] = value;
+    _has_new_data = true;
+  }
+
+  T get(uint worker_i) {
+    assert(worker_i < _length, err_msg("Worker %d is greater than max: %d", worker_i, _length));
+    assert(_data[worker_i] != (T)-1, err_msg("No data to add to for worker %d", worker_i));
+    return _data[worker_i];
+  }
+
+  void add(uint worker_i, T value) {
+    assert(worker_i < _length, err_msg("Worker %d is greater than max: %d", worker_i, _length));
+    assert(_data[worker_i] != (T)-1, err_msg("No data to add to for worker %d", worker_i));
+    _data[worker_i] += value;
+    _has_new_data = true;
+  }
+
+  double average(){
+    if (_has_new_data) {
+      calculate_totals();
+    }
+    return _average;
+  }
+
+  T sum() {
+    if (_has_new_data) {
+      calculate_totals();
+    }
+    return _sum;
+  }
+
+  void print(int level, const char* title);
+
+  void reset() PRODUCT_RETURN;
+  void verify() PRODUCT_RETURN;
+
+ private:
+
+  void calculate_totals(){
+    _sum = (T)0;
+    for (uint i = 0; i < _length; ++i) {
+      _sum += _data[i];
+    }
+    _average = (double)_sum / (double)_length;
+    _has_new_data = false;
+  }
+};
+
 class G1GCPhaseTimes : public CHeapObj<mtGC> {
-  friend class G1CollectorPolicy;
-  friend class TraceGen0TimeData;
 
  private:
   uint _active_gc_threads;
   uint _max_gc_threads;
 
-  GCCause::Cause _gc_cause;
-  bool           _is_young_gc;
-  bool           _is_initial_mark_gc;
-
-  double _pause_start_time_sec;
-
-  double* _par_last_gc_worker_start_times_ms;
-  double* _par_last_ext_root_scan_times_ms;
-  double* _par_last_satb_filtering_times_ms;
-  double* _par_last_update_rs_times_ms;
-  double* _par_last_update_rs_processed_buffers;
-  double* _par_last_scan_rs_times_ms;
-  double* _par_last_obj_copy_times_ms;
-  double* _par_last_termination_times_ms;
-  double* _par_last_termination_attempts;
-  double* _par_last_gc_worker_end_times_ms;
-  double* _par_last_gc_worker_times_ms;
-  double* _par_last_gc_worker_other_times_ms;
+  WorkerDataArray<double> _last_gc_worker_start_times_ms;
+  WorkerDataArray<double> _last_ext_root_scan_times_ms;
+  WorkerDataArray<double> _last_satb_filtering_times_ms;
+  WorkerDataArray<double> _last_update_rs_times_ms;
+  WorkerDataArray<int>    _last_update_rs_processed_buffers;
+  WorkerDataArray<double> _last_scan_rs_times_ms;
+  WorkerDataArray<double> _last_obj_copy_times_ms;
+  WorkerDataArray<double> _last_termination_times_ms;
+  WorkerDataArray<size_t> _last_termination_attempts;
+  WorkerDataArray<double> _last_gc_worker_end_times_ms;
+  WorkerDataArray<double> _last_gc_worker_times_ms;
+  WorkerDataArray<double> _last_gc_worker_other_times_ms;
 
   double _cur_collection_par_time_ms;
-
   d