hotspot/src/share/vm/logging/logTagLevelExpression.hpp
changeset 40913 072bdbb90c13
parent 40884 0e28c526f5d3
equal deleted inserted replaced
40912:7f19457ea0fc 40913:072bdbb90c13
    57 
    57 
    58     _ncombinations++;
    58     _ncombinations++;
    59     _ntags = 0;
    59     _ntags = 0;
    60   }
    60   }
    61 
    61 
    62   void add_tag(LogTagType tag) {
    62   bool add_tag(LogTagType tag) {
    63     assert(_ntags < LogTag::MaxTags, "Can't have more tags than MaxTags!");
    63     assert(_ntags < LogTag::MaxTags, "Can't have more tags than MaxTags!");
       
    64     for (size_t i = 0; i < _ntags; i++) {
       
    65       if (_tags[_ncombinations][i] == tag) {
       
    66         return false;
       
    67       }
       
    68     }
    64     _tags[_ncombinations][_ntags++] = tag;
    69     _tags[_ncombinations][_ntags++] = tag;
       
    70     return true;
    65   }
    71   }
    66 
    72 
    67   void set_level(LogLevelType level) {
    73   void set_level(LogLevelType level) {
    68     _level[_ncombinations] = level;
    74     _level[_ncombinations] = level;
    69   }
    75   }