156
157 // copy the name, including null terminator, into PerfData memory
158 strcpy(cname, name());
159
160
161 // set the header values in PerfData memory
162 PerfDataEntry* pdep = (PerfDataEntry*)psmp;
163 pdep->entry_length = (jint)size;
164 pdep->name_offset = (jint) ((uintptr_t) cname - (uintptr_t) psmp);
165 pdep->vector_length = (jint)vlen;
166 pdep->data_type = (jbyte) type2char(dtype);
167 pdep->data_units = units();
168 pdep->data_variability = variability();
169 pdep->flags = (jbyte)flags();
170 pdep->data_offset = (jint) data_start;
171
172 log_debug(perf, datacreation)("name = %s, dtype = %d, variability = %d,"
173 " units = %d, dsize = " SIZE_FORMAT ", vlen = " SIZE_FORMAT ","
174 " pad_length = " SIZE_FORMAT ", size = " SIZE_FORMAT ", on_c_heap = %s,"
175 " address = " INTPTR_FORMAT ","
176 " data address = " INTPTR_FORMAT "\n",
177 cname, dtype, variability(),
178 units(), dsize, vlen,
179 pad_length, size, is_on_c_heap() ? "TRUE":"FALSE",
180 p2i(psmp), p2i(valuep));
181
182 // record the start of the entry and the location of the data field.
183 _pdep = pdep;
184 _valuep = valuep;
185
186 // mark the PerfData memory region as having been updated.
187 PerfMemory::mark_updated();
188 }
189
190 PerfLong::PerfLong(CounterNS ns, const char* namep, Units u, Variability v)
191 : PerfData(ns, namep, u, v) {
192
193 create_entry(T_LONG, sizeof(jlong));
194 }
195
196 int PerfLong::format(char* buffer, int length) {
|
156
157 // copy the name, including null terminator, into PerfData memory
158 strcpy(cname, name());
159
160
161 // set the header values in PerfData memory
162 PerfDataEntry* pdep = (PerfDataEntry*)psmp;
163 pdep->entry_length = (jint)size;
164 pdep->name_offset = (jint) ((uintptr_t) cname - (uintptr_t) psmp);
165 pdep->vector_length = (jint)vlen;
166 pdep->data_type = (jbyte) type2char(dtype);
167 pdep->data_units = units();
168 pdep->data_variability = variability();
169 pdep->flags = (jbyte)flags();
170 pdep->data_offset = (jint) data_start;
171
172 log_debug(perf, datacreation)("name = %s, dtype = %d, variability = %d,"
173 " units = %d, dsize = " SIZE_FORMAT ", vlen = " SIZE_FORMAT ","
174 " pad_length = " SIZE_FORMAT ", size = " SIZE_FORMAT ", on_c_heap = %s,"
175 " address = " INTPTR_FORMAT ","
176 " data address = " INTPTR_FORMAT,
177 cname, dtype, variability(),
178 units(), dsize, vlen,
179 pad_length, size, is_on_c_heap() ? "TRUE":"FALSE",
180 p2i(psmp), p2i(valuep));
181
182 // record the start of the entry and the location of the data field.
183 _pdep = pdep;
184 _valuep = valuep;
185
186 // mark the PerfData memory region as having been updated.
187 PerfMemory::mark_updated();
188 }
189
190 PerfLong::PerfLong(CounterNS ns, const char* namep, Units u, Variability v)
191 : PerfData(ns, namep, u, v) {
192
193 create_entry(T_LONG, sizeof(jlong));
194 }
195
196 int PerfLong::format(char* buffer, int length) {
|