< prev index next >

src/hotspot/share/asm/codeBuffer.hpp

Print this page

417 };
418 
419 // The assumption made here is that most code remarks (or comments) added to
420 // the generated assembly code are unique, i.e. there is very little gain in
421 // trying to share the strings between the different offsets tracked in a
422 // buffer (or blob).
423 
424 class AsmRemarks {
425  public:
426   AsmRemarks();
427  ~AsmRemarks();
428 
429   void init();
430 
431   const char* insert(uint offset, const char* remstr);
432 
433   bool is_empty() const;
434 
435   void share(const AsmRemarks &src);
436   void clear();



437   uint print(uint offset, outputStream* strm = tty) const;
438 
439   // For testing purposes only.
440   const AsmRemarkCollection* ref() const { return _remarks; }
441 
442   template<typename Function>
443   inline bool iterate(Function function) const { return _remarks->iterate(function); }
444 
445 private:
446   AsmRemarkCollection* _remarks;
447 };
448 
449 // The assumption made here is that the number of debug strings (with a fixed
450 // address requirement) is a rather small set per compilation unit.
451 
452 class DbgStrings {
453  public:
454   DbgStrings();
455  ~DbgStrings();
456 
457   void init();
458 
459   const char* insert(const char* dbgstr);
460 
461   bool is_empty() const;
462 
463   void share(const DbgStrings &src);
464   void clear();



465 
466   // For testing purposes only.
467   const DbgStringCollection* ref() const { return _strings; }
468 
469   template<typename Function>
470   bool iterate(Function function) const { return _strings->iterate(function); }
471 
472 private:
473   DbgStringCollection* _strings;
474 };
475 #endif // not PRODUCT
476 
477 
478 #ifdef ASSERT
479 #include "utilities/copy.hpp"
480 
481 class Scrubber {
482  public:
483   Scrubber(void* addr, size_t size) : _addr(addr), _size(size) {}
484  ~Scrubber() {

417 };
418 
419 // The assumption made here is that most code remarks (or comments) added to
420 // the generated assembly code are unique, i.e. there is very little gain in
421 // trying to share the strings between the different offsets tracked in a
422 // buffer (or blob).
423 
424 class AsmRemarks {
425  public:
426   AsmRemarks();
427  ~AsmRemarks();
428 
429   void init();
430 
431   const char* insert(uint offset, const char* remstr);
432 
433   bool is_empty() const;
434 
435   void share(const AsmRemarks &src);
436   void clear();
437   // Clear Collection refence when storing AOT code,
438   // new one will be created during AOT code load.
439   void clear_ref() { _remarks = nullptr; }
440   uint print(uint offset, outputStream* strm = tty) const;
441 
442   // For testing purposes only.
443   const AsmRemarkCollection* ref() const { return _remarks; }
444 
445   template<typename Function>
446   inline bool iterate(Function function) const { return _remarks->iterate(function); }
447 
448 private:
449   AsmRemarkCollection* _remarks;
450 };
451 
452 // The assumption made here is that the number of debug strings (with a fixed
453 // address requirement) is a rather small set per compilation unit.
454 
455 class DbgStrings {
456  public:
457   DbgStrings();
458  ~DbgStrings();
459 
460   void init();
461 
462   const char* insert(const char* dbgstr);
463 
464   bool is_empty() const;
465 
466   void share(const DbgStrings &src);
467   void clear();
468   // Clear Collection refence when storing AOT code,
469   // new one will be created during AOT code load.
470   void clear_ref() { _strings = nullptr; }
471 
472   // For testing purposes only.
473   const DbgStringCollection* ref() const { return _strings; }
474 
475   template<typename Function>
476   bool iterate(Function function) const { return _strings->iterate(function); }
477 
478 private:
479   DbgStringCollection* _strings;
480 };
481 #endif // not PRODUCT
482 
483 
484 #ifdef ASSERT
485 #include "utilities/copy.hpp"
486 
487 class Scrubber {
488  public:
489   Scrubber(void* addr, size_t size) : _addr(addr), _size(size) {}
490  ~Scrubber() {
< prev index next >