hotspot/src/share/vm/compiler/compilerOracle.cpp
changeset 40079 40d48ddc12bc
parent 35138 de9e69473956
child 46560 388aa8d67c80
equal deleted inserted replaced
40078:77b7fa0cf03c 40079:40d48ddc12bc
   817       strncpy(newName, name, i);
   817       strncpy(newName, name, i);
   818       newName[i] = '\0';
   818       newName[i] = '\0';
   819 
   819 
   820       if (className == NULL) {
   820       if (className == NULL) {
   821         className = newName;
   821         className = newName;
   822         c_match = MethodMatcher::Prefix;
       
   823       } else {
   822       } else {
   824         methodName = newName;
   823         methodName = newName;
   825       }
   824       }
   826     }
   825     }
   827 
   826 
   828     if (*line == method_sep) {
   827     if (*line == method_sep) {
   829       if (className == NULL) {
   828       if (className == NULL) {
   830         className = "";
   829         className = "";
   831         c_match = MethodMatcher::Any;
   830         c_match = MethodMatcher::Any;
   832       } else {
       
   833         // foo/bar.blah is an exact match on foo/bar, bar.blah is a suffix match on bar
       
   834         if (strchr(className, '/') != NULL) {
       
   835           c_match = MethodMatcher::Exact;
       
   836         } else {
       
   837           c_match = MethodMatcher::Suffix;
       
   838         }
       
   839       }
   831       }
   840     } else {
   832     } else {
   841       // got foo or foo/bar
   833       // got foo or foo/bar
   842       if (className == NULL) {
   834       if (className == NULL) {
   843         ShouldNotReachHere();
   835         ShouldNotReachHere();
   844       } else {
   836       } else {
   845         // got foo or foo/bar
   837         // missing class name handled as "Any" class match
   846         if (strchr(className, '/') != NULL) {
   838         if (className[0] == '\0') {
   847           c_match = MethodMatcher::Prefix;
       
   848         } else if (className[0] == '\0') {
       
   849           c_match = MethodMatcher::Any;
   839           c_match = MethodMatcher::Any;
   850         } else {
       
   851           c_match = MethodMatcher::Substring;
       
   852         }
   840         }
   853       }
   841       }
   854     }
   842     }
   855 
   843 
   856     // each directive is terminated by , or NUL or . followed by NUL
   844     // each directive is terminated by , or NUL or . followed by NUL