equal
deleted
inserted
replaced
123 |
123 |
124 Thread* THREAD = Thread::current(); |
124 Thread* THREAD = Thread::current(); |
125 |
125 |
126 // Find a symbol where there will probably be only one instance. |
126 // Find a symbol where there will probably be only one instance. |
127 for (int i = 0; i < 100; i++) { |
127 for (int i = 0; i < 100; i++) { |
128 snprintf(symbol_name, SYM_NAME_LENGTH, "some_symbol%d", i); |
128 os::snprintf(symbol_name, SYM_NAME_LENGTH, "some_symbol%d", i); |
129 TempNewSymbol ts = SymbolTable::new_symbol(symbol_name, CATCH); |
129 TempNewSymbol ts = SymbolTable::new_symbol(symbol_name, CATCH); |
130 if (ts->refcount() == 1) { |
130 if (ts->refcount() == 1) { |
131 EXPECT_TRUE(ts->refcount() == 1) << "Symbol is just created"; |
131 EXPECT_TRUE(ts->refcount() == 1) << "Symbol is just created"; |
132 break; // found a unique symbol |
132 break; // found a unique symbol |
133 } |
133 } |