void print(const CMPIObjectPath* op) { printf("CMPIObjectPath\n"); printf("{\n"); printf(" name_space: \"%s\"\n", name_space(op)); printf(" class_name: \"%s\"\n", class_name(op)); printf(" host_name: \"%s\"\n", host_name(op)); printf(" ---\n"); for (size_t i = 0, n = CMGetKeyCount(op, NULL); i < n; i++) { CMPIString* name; CMPIData data = CMGetKeyAt(op, i, &name, NULL); printf(" %s(%s): ", CMGetCharPtr(name), type_name_of(data.type)); print(data); putchar('\n'); } printf("}\n"); }
static bool _proc( Instance* cimple_inst, Enum_Instances_Status status, void* client_data) { Data* data = (Data*)client_data; Destroyer<Instance> destroyer(cimple_inst); if (!cimple_inst) return false; // Ignore if an error was already encountered. if (data->rc != CMPI_RC_OK) return false; // Filter out unwanted properties. filter_properties(cimple_inst, data->properties); // Convert to a CMPI instance and deliver: CMPIInstance* cmpi_inst = 0; data->rc = make_cmpi_instance( data->broker, cimple_inst, name_space(data->cmpi_op), data->cmpi_op, cmpi_inst); if (data->rc != CMPI_RC_OK) return false; CMReturnInstance(data->result, cmpi_inst); return true; }
void persist_context::set_node(const std::string &name) { active_ = &(root_node_.child(name)); namespace_ = name_space(namespace_.namespace_ + "." + name); }
PSGCAdaptivePolicyCounters::PSGCAdaptivePolicyCounters(const char* name_arg, int collectors, int generations, PSAdaptiveSizePolicy* size_policy_arg) : GCAdaptivePolicyCounters(name_arg, collectors, generations, size_policy_arg) { if (UsePerfData) { EXCEPTION_MARK; ResourceMark rm; const char* cname; cname = PerfDataManager::counter_name(name_space(), "oldPromoSize"); _old_promo_size = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes, ps_size_policy()->calculated_promo_size_in_bytes(), CHECK); cname = PerfDataManager::counter_name(name_space(), "oldEdenSize"); _old_eden_size = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes, ps_size_policy()->calculated_eden_size_in_bytes(), CHECK); cname = PerfDataManager::counter_name(name_space(), "oldCapacity"); _old_capacity = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes, (jlong) Arguments::initial_heap_size(), CHECK); cname = PerfDataManager::counter_name(name_space(), "boundaryMoved"); _boundary_moved = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes, (jlong) 0, CHECK); cname = PerfDataManager::counter_name(name_space(), "avgPromotedAvg"); _avg_promoted_avg_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes, ps_size_policy()->calculated_promo_size_in_bytes(), CHECK); cname = PerfDataManager::counter_name(name_space(), "avgPromotedDev"); _avg_promoted_dev_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes, (jlong) 0 , CHECK); cname = PerfDataManager::counter_name(name_space(), "avgPromotedPaddedAvg"); _avg_promoted_padded_avg_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes, ps_size_policy()->calculated_promo_size_in_bytes(), CHECK); cname = PerfDataManager::counter_name(name_space(), "avgPretenuredPaddedAvg"); _avg_pretenured_padded_avg = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes, (jlong) 0, CHECK); cname = PerfDataManager::counter_name(name_space(), "changeYoungGenForMajPauses"); _change_young_gen_for_maj_pauses_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Events, (jlong)0, CHECK); cname = PerfDataManager::counter_name(name_space(), "changeOldGenForMinPauses"); _change_old_gen_for_min_pauses = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Events, (jlong)0, CHECK); cname = PerfDataManager::counter_name(name_space(), "avgMajorPauseTime"); _avg_major_pause = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Ticks, (jlong) ps_size_policy()->_avg_major_pause->average(), CHECK); cname = PerfDataManager::counter_name(name_space(), "avgMajorIntervalTime"); _avg_major_interval = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Ticks, (jlong) ps_size_policy()->_avg_major_interval->average(), CHECK); cname = PerfDataManager::counter_name(name_space(), "majorGcCost"); _major_gc_cost_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Ticks, (jlong) ps_size_policy()->major_gc_cost(), CHECK); cname = PerfDataManager::counter_name(name_space(), "liveSpace"); _live_space = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes, ps_size_policy()->live_space(), CHECK); cname = PerfDataManager::counter_name(name_space(), "freeSpace"); _free_space = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes, ps_size_policy()->free_space(), CHECK); cname = PerfDataManager::counter_name(name_space(), "avgBaseFootprint"); _avg_base_footprint = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes, (jlong) ps_size_policy()->avg_base_footprint()->average(), CHECK); cname = PerfDataManager::counter_name(name_space(), "gcTimeLimitExceeded"); _gc_time_limit_exceeded = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Events, ps_size_policy()->gc_time_limit_exceeded(), CHECK); cname = PerfDataManager::counter_name(name_space(), "liveAtLastFullGc"); _live_at_last_full_gc = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes, ps_size_policy()->live_at_last_full_gc(), CHECK); cname = PerfDataManager::counter_name(name_space(), "majorPauseOldSlope"); _major_pause_old_slope = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_None, (jlong) 0, CHECK); cname = PerfDataManager::counter_name(name_space(), "minorPauseOldSlope"); _minor_pause_old_slope = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_None, (jlong) 0, CHECK); cname = PerfDataManager::counter_name(name_space(), "majorPauseYoungSlope"); _major_pause_young_slope = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_None, (jlong) 0, CHECK); cname = PerfDataManager::counter_name(name_space(), "scavengeSkipped"); _scavenge_skipped = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes, (jlong) 0, CHECK); cname = PerfDataManager::counter_name(name_space(), "fullFollowsScavenge"); _full_follows_scavenge = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes, (jlong) 0, CHECK); _counter_time_stamp.update(); } assert(size_policy()->is_gc_ps_adaptive_size_policy(), "Wrong type of size policy"); }
name_space prev() const { return name_space(lineage_); }
name_space next() const { return name_space(descendants_); }
CMSGCAdaptivePolicyCounters::CMSGCAdaptivePolicyCounters(const char* name_arg, int collectors, int generations, AdaptiveSizePolicy* size_policy_arg) : GCAdaptivePolicyCounters(name_arg, collectors, generations, size_policy_arg) { if (UsePerfData) { EXCEPTION_MARK; ResourceMark rm; const char* cname = PerfDataManager::counter_name(name_space(), "cmsCapacity"); _cms_capacity_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes, (jlong) OldSize, CHECK); #ifdef NOT_PRODUCT cname = PerfDataManager::counter_name(name_space(), "initialPause"); _initial_pause_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Ticks, (jlong) cms_size_policy()->avg_initial_pause()->last_sample(), CHECK); cname = PerfDataManager::counter_name(name_space(), "remarkPause"); _remark_pause_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Ticks, (jlong) cms_size_policy()->avg_remark_pause()->last_sample(), CHECK); #endif cname = PerfDataManager::counter_name(name_space(), "avgInitialPause"); _avg_initial_pause_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Ticks, (jlong) cms_size_policy()->avg_initial_pause()->average(), CHECK); cname = PerfDataManager::counter_name(name_space(), "avgRemarkPause"); _avg_remark_pause_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Ticks, (jlong) cms_size_policy()->avg_remark_pause()->average(), CHECK); cname = PerfDataManager::counter_name(name_space(), "avgSTWGcCost"); _avg_cms_STW_gc_cost_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Ticks, (jlong) cms_size_policy()->avg_cms_STW_gc_cost()->average(), CHECK); cname = PerfDataManager::counter_name(name_space(), "avgSTWTime"); _avg_cms_STW_time_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Ticks, (jlong) cms_size_policy()->avg_cms_STW_time()->average(), CHECK); cname = PerfDataManager::counter_name(name_space(), "avgConcurrentTime"); _avg_concurrent_time_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Ticks, (jlong) cms_size_policy()->avg_concurrent_time()->average(), CHECK); cname = PerfDataManager::counter_name(name_space(), "avgConcurrentInterval"); _avg_concurrent_interval_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Ticks, (jlong) cms_size_policy()->avg_concurrent_interval()->average(), CHECK); cname = PerfDataManager::counter_name(name_space(), "avgConcurrentGcCost"); _avg_concurrent_gc_cost_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Ticks, (jlong) cms_size_policy()->avg_concurrent_gc_cost()->average(), CHECK); cname = PerfDataManager::counter_name(name_space(), "avgCMSFreeAtSweep"); _avg_cms_free_at_sweep_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Ticks, (jlong) cms_size_policy()->avg_cms_free_at_sweep()->average(), CHECK); cname = PerfDataManager::counter_name(name_space(), "avgCMSFree"); _avg_cms_free_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Ticks, (jlong) cms_size_policy()->avg_cms_free()->average(), CHECK); cname = PerfDataManager::counter_name(name_space(), "avgCMSPromo"); _avg_cms_promo_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Ticks, (jlong) cms_size_policy()->avg_cms_promo()->average(), CHECK); cname = PerfDataManager::counter_name(name_space(), "avgMscPause"); _avg_msc_pause_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Ticks, (jlong) cms_size_policy()->avg_msc_pause()->average(), CHECK); cname = PerfDataManager::counter_name(name_space(), "avgMscInterval"); _avg_msc_interval_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Ticks, (jlong) cms_size_policy()->avg_msc_interval()->average(), CHECK); cname = PerfDataManager::counter_name(name_space(), "mscGcCost"); _msc_gc_cost_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Ticks, (jlong) cms_size_policy()->avg_msc_gc_cost()->average(), CHECK); cname = PerfDataManager::counter_name(name_space(), "avgMsPause"); _avg_ms_pause_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Ticks, (jlong) cms_size_policy()->avg_ms_pause()->average(), CHECK); cname = PerfDataManager::counter_name(name_space(), "avgMsInterval"); _avg_ms_interval_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Ticks, (jlong) cms_size_policy()->avg_ms_interval()->average(), CHECK); cname = PerfDataManager::counter_name(name_space(), "msGcCost"); _ms_gc_cost_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Ticks, (jlong) cms_size_policy()->avg_ms_gc_cost()->average(), CHECK); cname = PerfDataManager::counter_name(name_space(), "majorGcCost"); _major_gc_cost_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Ticks, (jlong) cms_size_policy()->cms_gc_cost(), CHECK); cname = PerfDataManager::counter_name(name_space(), "avgPromotedAvg"); _promoted_avg_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes, cms_size_policy()->calculated_promo_size_in_bytes(), CHECK); cname = PerfDataManager::counter_name(name_space(), "avgPromotedDev"); _promoted_avg_dev_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes, (jlong) 0 , CHECK); cname = PerfDataManager::counter_name(name_space(), "avgPromotedPaddedAvg"); _promoted_padded_avg_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes, cms_size_policy()->calculated_promo_size_in_bytes(), CHECK); cname = PerfDataManager::counter_name(name_space(), "changeYoungGenForMajPauses"); _change_young_gen_for_maj_pauses_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Events, (jlong)0, CHECK); cname = PerfDataManager::counter_name(name_space(), "remarkPauseOldSlope"); _remark_pause_old_slope_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes, (jlong) cms_size_policy()->remark_pause_old_slope(), CHECK); cname = PerfDataManager::counter_name(name_space(), "initialPauseOldSlope"); _initial_pause_old_slope_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes, (jlong) cms_size_policy()->initial_pause_old_slope(), CHECK); cname = PerfDataManager::counter_name(name_space(), "remarkPauseYoungSlope") ; _remark_pause_young_slope_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes, (jlong) cms_size_policy()->remark_pause_young_slope(), CHECK); cname = PerfDataManager::counter_name(name_space(), "initialPauseYoungSlope"); _initial_pause_young_slope_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes, (jlong) cms_size_policy()->initial_pause_young_slope(), CHECK); } assert(size_policy()->is_gc_cms_adaptive_size_policy(), "Wrong type of size policy"); }
GCAdaptivePolicyCounters::GCAdaptivePolicyCounters(const char* name, int collectors, int generations, AdaptiveSizePolicy* size_policy_arg) : GCPolicyCounters(name, collectors, generations), _size_policy(size_policy_arg) { if (UsePerfData) { EXCEPTION_MARK; ResourceMark rm; const char* cname = PerfDataManager::counter_name(name_space(), "edenSize"); _eden_size_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes, _size_policy->calculated_eden_size_in_bytes(), CHECK); cname = PerfDataManager::counter_name(name_space(), "promoSize"); _promo_size_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes, size_policy()->calculated_promo_size_in_bytes(), CHECK); cname = PerfDataManager::counter_name(name_space(), "youngCapacity"); size_t young_capacity_in_bytes = _size_policy->calculated_eden_size_in_bytes() + _size_policy->calculated_survivor_size_in_bytes(); _young_capacity_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes, young_capacity_in_bytes, CHECK); cname = PerfDataManager::counter_name(name_space(), "avgSurvivedAvg"); _avg_survived_avg_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes, size_policy()->calculated_survivor_size_in_bytes(), CHECK); cname = PerfDataManager::counter_name(name_space(), "avgSurvivedDev"); _avg_survived_dev_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes, (jlong) 0 , CHECK); cname = PerfDataManager::counter_name(name_space(), "avgSurvivedPaddedAvg"); _avg_survived_padded_avg_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes, size_policy()->calculated_survivor_size_in_bytes(), CHECK); cname = PerfDataManager::counter_name(name_space(), "avgMinorPauseTime"); _avg_minor_pause_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Ticks, (jlong) _size_policy->_avg_minor_pause->average(), CHECK); cname = PerfDataManager::counter_name(name_space(), "avgMinorIntervalTime"); _avg_minor_interval_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Ticks, (jlong) _size_policy->_avg_minor_interval->average(), CHECK); #ifdef NOT_PRODUCT // This is a counter for the most recent minor pause time // (the last sample, not the average). It is useful for // verifying the average pause time but not worth putting // into the product. cname = PerfDataManager::counter_name(name_space(), "minorPauseTime"); _minor_pause_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Ticks, (jlong) _size_policy->_avg_minor_pause->last_sample(), CHECK); #endif cname = PerfDataManager::counter_name(name_space(), "minorGcCost"); _minor_gc_cost_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Ticks, (jlong) _size_policy->minor_gc_cost(), CHECK); cname = PerfDataManager::counter_name(name_space(), "mutatorCost"); _mutator_cost_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Ticks, (jlong) _size_policy->mutator_cost(), CHECK); cname = PerfDataManager::counter_name(name_space(), "survived"); _survived_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes, (jlong) 0, CHECK); cname = PerfDataManager::counter_name(name_space(), "promoted"); _promoted_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes, (jlong) 0, CHECK); cname = PerfDataManager::counter_name(name_space(), "avgYoungLive"); _avg_young_live_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes, (jlong) size_policy()->avg_young_live()->average(), CHECK); cname = PerfDataManager::counter_name(name_space(), "avgOldLive"); _avg_old_live_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes, (jlong) size_policy()->avg_old_live()->average(), CHECK); cname = PerfDataManager::counter_name(name_space(), "survivorOverflowed"); _survivor_overflowed_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Events, (jlong)0, CHECK); cname = PerfDataManager::counter_name(name_space(), "decrementTenuringThresholdForGcCost"); _decrement_tenuring_threshold_for_gc_cost_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Events, (jlong)0, CHECK); cname = PerfDataManager::counter_name(name_space(), "incrementTenuringThresholdForGcCost"); _increment_tenuring_threshold_for_gc_cost_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Events, (jlong)0, CHECK); cname = PerfDataManager::counter_name(name_space(), "decrementTenuringThresholdForSurvivorLimit"); _decrement_tenuring_threshold_for_survivor_limit_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Events, (jlong)0, CHECK); cname = PerfDataManager::counter_name(name_space(), "changeYoungGenForMinPauses"); _change_young_gen_for_min_pauses_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Events, (jlong)0, CHECK); cname = PerfDataManager::counter_name(name_space(), "changeOldGenForMajPauses"); _change_old_gen_for_maj_pauses_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Events, (jlong)0, CHECK); cname = PerfDataManager::counter_name(name_space(), "increaseOldGenForThroughput"); _change_old_gen_for_throughput_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Events, (jlong)0, CHECK); cname = PerfDataManager::counter_name(name_space(), "increaseYoungGenForThroughput"); _change_young_gen_for_throughput_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Events, (jlong)0, CHECK); cname = PerfDataManager::counter_name(name_space(), "decreaseForFootprint"); _decrease_for_footprint_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Events, (jlong)0, CHECK); cname = PerfDataManager::counter_name(name_space(), "decideAtFullGc"); _decide_at_full_gc_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_None, (jlong)0, CHECK); cname = PerfDataManager::counter_name(name_space(), "minorPauseYoungSlope"); _minor_pause_young_slope_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_None, (jlong) 0, CHECK); cname = PerfDataManager::counter_name(name_space(), "majorCollectionSlope"); _major_collection_slope_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_None, (jlong) 0, CHECK); cname = PerfDataManager::counter_name(name_space(), "minorCollectionSlope"); _minor_collection_slope_counter = PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_None, (jlong) 0, CHECK); } }
void persist_context::set_node(const std::string &name) { std::string newspace = namespace_.root_; if (!name.empty()) newspace += "." + name; namespace_ = name_space(newspace); }