comparison src/os/solaris/dtrace/jhelper.d @ 2177:3582bf76420e

6990754: Use native memory and reference counting to implement SymbolTable Summary: move symbols from permgen into C heap and reference count them Reviewed-by: never, acorn, jmasa, stefank
author coleenp
date Thu, 27 Jan 2011 16:11:27 -0800
parents c18cbe5936b8
children 1d1603768966
comparison
equal deleted inserted replaced
2176:27e4ea99855d 2177:3582bf76420e
112 copyin_offset(OFFSET_constantPoolOopDesc_pool_holder); 112 copyin_offset(OFFSET_constantPoolOopDesc_pool_holder);
113 113
114 copyin_offset(OFFSET_HeapBlockHeader_used); 114 copyin_offset(OFFSET_HeapBlockHeader_used);
115 copyin_offset(OFFSET_oopDesc_metadata); 115 copyin_offset(OFFSET_oopDesc_metadata);
116 116
117 copyin_offset(OFFSET_symbolOopDesc_length); 117 copyin_offset(OFFSET_Symbol_length);
118 copyin_offset(OFFSET_symbolOopDesc_body); 118 copyin_offset(OFFSET_Symbol_body);
119 119
120 copyin_offset(OFFSET_methodOopDesc_constMethod); 120 copyin_offset(OFFSET_methodOopDesc_constMethod);
121 copyin_offset(OFFSET_methodOopDesc_constants); 121 copyin_offset(OFFSET_methodOopDesc_constants);
122 copyin_offset(OFFSET_constMethodOopDesc_name_index); 122 copyin_offset(OFFSET_constMethodOopDesc_name_index);
123 copyin_offset(OFFSET_constMethodOopDesc_signature_index); 123 copyin_offset(OFFSET_constMethodOopDesc_signature_index);
364 364
365 this->nameSymbol = copyin_ptr(this->constantPool + 365 this->nameSymbol = copyin_ptr(this->constantPool +
366 this->nameIndex * sizeof (pointer) + SIZE_constantPoolOopDesc); 366 this->nameIndex * sizeof (pointer) + SIZE_constantPoolOopDesc);
367 367
368 this->nameSymbolLength = copyin_uint16(this->nameSymbol + 368 this->nameSymbolLength = copyin_uint16(this->nameSymbol +
369 OFFSET_symbolOopDesc_length); 369 OFFSET_Symbol_length);
370 370
371 this->signatureSymbol = copyin_ptr(this->constantPool + 371 this->signatureSymbol = copyin_ptr(this->constantPool +
372 this->signatureIndex * sizeof (pointer) + SIZE_constantPoolOopDesc); 372 this->signatureIndex * sizeof (pointer) + SIZE_constantPoolOopDesc);
373 373
374 this->signatureSymbolLength = copyin_uint16(this->signatureSymbol + 374 this->signatureSymbolLength = copyin_uint16(this->signatureSymbol +
375 OFFSET_symbolOopDesc_length); 375 OFFSET_Symbol_length);
376 376
377 this->klassPtr = copyin_ptr(this->constantPool + 377 this->klassPtr = copyin_ptr(this->constantPool +
378 OFFSET_constantPoolOopDesc_pool_holder); 378 OFFSET_constantPoolOopDesc_pool_holder);
379 379
380 this->klassSymbol = copyin_ptr(this->klassPtr + 380 this->klassSymbol = copyin_ptr(this->klassPtr +
381 OFFSET_Klass_name + SIZE_oopDesc); 381 OFFSET_Klass_name + SIZE_oopDesc);
382 382
383 this->klassSymbolLength = copyin_uint16(this->klassSymbol + 383 this->klassSymbolLength = copyin_uint16(this->klassSymbol +
384 OFFSET_symbolOopDesc_length); 384 OFFSET_Symbol_length);
385 385
386 /* 386 /*
387 * Enough for three strings, plus the '.', plus the trailing '\0'. 387 * Enough for three strings, plus the '.', plus the trailing '\0'.
388 */ 388 */
389 this->result = (char *) alloca(this->klassSymbolLength + 389 this->result = (char *) alloca(this->klassSymbolLength +
390 this->nameSymbolLength + 390 this->nameSymbolLength +
391 this->signatureSymbolLength + 2 + 1); 391 this->signatureSymbolLength + 2 + 1);
392 392
393 copyinto(this->klassSymbol + OFFSET_symbolOopDesc_body, 393 copyinto(this->klassSymbol + OFFSET_Symbol_body,
394 this->klassSymbolLength, this->result); 394 this->klassSymbolLength, this->result);
395 395
396 /* 396 /*
397 * Add the '.' between the class and the name. 397 * Add the '.' between the class and the name.
398 */ 398 */
399 this->result[this->klassSymbolLength] = '.'; 399 this->result[this->klassSymbolLength] = '.';
400 400
401 copyinto(this->nameSymbol + OFFSET_symbolOopDesc_body, 401 copyinto(this->nameSymbol + OFFSET_Symbol_body,
402 this->nameSymbolLength, 402 this->nameSymbolLength,
403 this->result + this->klassSymbolLength + 1); 403 this->result + this->klassSymbolLength + 1);
404 404
405 copyinto(this->signatureSymbol + OFFSET_symbolOopDesc_body, 405 copyinto(this->signatureSymbol + OFFSET_Symbol_body,
406 this->signatureSymbolLength, 406 this->signatureSymbolLength,
407 this->result + this->klassSymbolLength + 407 this->result + this->klassSymbolLength +
408 this->nameSymbolLength + 1); 408 this->nameSymbolLength + 1);
409 409
410 /* 410 /*