-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8309044: Replace NULL with nullptr, final sweep of hotspot code #14198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -122,7 +122,7 @@ void CodeInstaller::pd_relocate_ForeignCall(NativeInstruction* inst, jlong forei | |
| } | ||
|
|
||
| void CodeInstaller::pd_relocate_JavaMethod(CodeBuffer &cbuf, methodHandle& method, jint pc_offset, JVMCI_TRAPS) { | ||
| NativeCall* call = NULL; | ||
| NativeCall* call = nullptr; | ||
| switch (_next_call_type) { | ||
| case INLINE_INVOKE: | ||
| return; | ||
|
|
@@ -155,7 +155,7 @@ void CodeInstaller::pd_relocate_JavaMethod(CodeBuffer &cbuf, methodHandle& metho | |
| if (Continuations::enabled()) { | ||
| // Check for proper post_call_nop | ||
| NativePostCallNop* nop = nativePostCallNop_at(call->next_instruction_address()); | ||
| if (nop == NULL) { | ||
| if (nop == nullptr) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| JVMCI_ERROR("missing post call nop at offset %d", pc_offset); | ||
| } else { | ||
| _instructions->relocate(call->next_instruction_address(), relocInfo::post_call_nop_type); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2294,7 +2294,7 @@ void TemplateTable::load_invokedynamic_entry(Register method) { | |
| __ load_resolved_indy_entry(cache, index); | ||
| __ ld_ptr(method, array_base_offset + in_bytes(ResolvedIndyEntry::method_offset()), cache); | ||
|
|
||
| // The invokedynamic is unresolved iff method is NULL | ||
| // The invokedynamic is unresolved iff method is null | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| __ cmpdi(CCR0, method, 0); | ||
| __ bne(CCR0, resolved); | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -371,5 +371,5 @@ void BarrierSetAssembler::check_oop(MacroAssembler* masm, Register obj, Register | |
|
|
||
| // Make sure klass is 'reasonable', which is not zero. | ||
| __ load_klass(obj, obj, tmp1); // get klass | ||
| __ beqz(obj, error); // if klass is NULL it is broken | ||
| __ beqz(obj, error); // if klass is null it is broken | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4016,7 +4016,7 @@ class StubGenerator: public StubCodeGenerator { | |
|
|
||
| StubRoutines::_forward_exception_entry = generate_forward_exception(); | ||
|
|
||
| if (UnsafeCopyMemory::_table == NULL) { | ||
| if (UnsafeCopyMemory::_table == nullptr) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| UnsafeCopyMemory::create_table(8); | ||
| } | ||
|
|
||
|
|
@@ -4074,7 +4074,7 @@ class StubGenerator: public StubCodeGenerator { | |
| generate_arraycopy_stubs(); | ||
|
|
||
| BarrierSetNMethod* bs_nm = BarrierSet::barrier_set()->barrier_set_nmethod(); | ||
| if (bs_nm != NULL) { | ||
| if (bs_nm != nullptr) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| StubRoutines::riscv::_method_entry_barrier = generate_method_entry_barrier(); | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -486,5 +486,5 @@ void BarrierSetAssembler::check_oop(MacroAssembler* masm, Register obj, Register | |
| // make sure klass is 'reasonable', which is not zero. | ||
| __ load_klass(obj, obj, tmp1); // get klass | ||
| __ testptr(obj, obj); | ||
| __ jcc(Assembler::zero, error); // if klass is NULL it is broken | ||
| __ jcc(Assembler::zero, error); // if klass is null it is broken | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -188,7 +188,7 @@ void CodeInstaller::pd_relocate_JavaMethod(CodeBuffer &, methodHandle& method, j | |
| if (Continuations::enabled()) { | ||
| // Check for proper post_call_nop | ||
| NativePostCallNop* nop = nativePostCallNop_at(call->next_instruction_address()); | ||
| if (nop == NULL) { | ||
| if (nop == nullptr) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| JVMCI_ERROR("missing post call nop at offset %d", pc_offset); | ||
| } else { | ||
| _instructions->relocate(call->next_instruction_address(), relocInfo::post_call_nop_type); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -276,7 +276,7 @@ static int pipeline_res_stages_initializer( | |
| int commentlen = 0; | ||
| int max_stage = 0; | ||
| i = 0; | ||
| for (pipeline->_reslist.reset(); (resource = pipeline->_reslist.iter()) != NULL;) { | ||
| for (pipeline->_reslist.reset(); (resource = pipeline->_reslist.iter()) != nullptr;) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| if (pipeline->_resdict[resource]->is_resource()->is_discrete()) { | ||
| if (res_stages[i] == 0) { | ||
| if (max_stage < 9) { | ||
|
|
@@ -302,7 +302,7 @@ static int pipeline_res_stages_initializer( | |
|
|
||
| templen = 0; | ||
| i = 0; | ||
| for (pipeline->_reslist.reset(); (resource = pipeline->_reslist.iter()) != NULL;) { | ||
| for (pipeline->_reslist.reset(); (resource = pipeline->_reslist.iter()) != nullptr;) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| if (pipeline->_resdict[resource]->is_resource()->is_discrete()) { | ||
| const char* const resname = res_stages[i] == 0 ? "undefined" : pipeline->_stages.name(res_stages[i] - 1); | ||
|
|
||
|
|
@@ -365,7 +365,7 @@ static int pipeline_res_cycles_initializer( | |
|
|
||
| const char* resource; | ||
| i = 0; | ||
| for (pipeline->_reslist.reset(); (resource = pipeline->_reslist.iter()) != NULL;) { | ||
| for (pipeline->_reslist.reset(); (resource = pipeline->_reslist.iter()) != nullptr;) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| if (pipeline->_resdict[resource]->is_resource()->is_discrete()) { | ||
| if (max_cycles < res_cycles[i]) { | ||
| max_cycles = res_cycles[i]; | ||
|
|
@@ -390,7 +390,7 @@ static int pipeline_res_cycles_initializer( | |
| templen = 0; | ||
|
|
||
| i = 0; | ||
| for (pipeline->_reslist.reset(); (resource = pipeline->_reslist.iter()) != NULL;) { | ||
| for (pipeline->_reslist.reset(); (resource = pipeline->_reslist.iter()) != nullptr;) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| if (pipeline->_resdict[resource]->is_resource()->is_discrete()) { | ||
| templen += snprintf_checked(&resource_cycles[templen], resource_cycles_size - templen, " %*d%c // %s\n", | ||
| cyclelen, res_cycles[i], (i < pipeline->_rescount-1) ? ',' : ' ', resource); | ||
|
|
@@ -1006,7 +1006,7 @@ void ArchDesc::build_pipe_classes(FILE *fp_cpp) { | |
| // Don't add compound resources to the list of resource names | ||
| const char* resource; | ||
| i = 0; | ||
| for (_pipeline->_reslist.reset(); (resource = _pipeline->_reslist.iter()) != NULL;) { | ||
| for (_pipeline->_reslist.reset(); (resource = _pipeline->_reslist.iter()) != nullptr;) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| if (_pipeline->_resdict[resource]->is_resource()->is_discrete()) { | ||
| fprintf(fp_cpp, " \"%s\"%c", resource, i < _pipeline->_rescount - 1 ? ',' : ' '); | ||
| i++; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -360,7 +360,7 @@ void SharedClassPathEntry::set_name(const char* name, TRAPS) { | |
| } | ||
|
|
||
| void SharedClassPathEntry::copy_from(SharedClassPathEntry* ent, ClassLoaderData* loader_data, TRAPS) { | ||
| assert(ent != NULL, "sanity"); | ||
| assert(ent != nullptr, "sanity"); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| _type = ent->_type; | ||
| _is_module_path = ent->_is_module_path; | ||
| _timestamp = ent->_timestamp; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -147,7 +147,7 @@ class StringTable : public CHeapObj<mtSymbol>{ | |
| static oop lookup_shared(const jchar* name, int len) NOT_CDS_JAVA_HEAP_RETURN_(nullptr); | ||
| static size_t shared_entry_count() NOT_CDS_JAVA_HEAP_RETURN_(0); | ||
| static void allocate_shared_strings_array(TRAPS) NOT_CDS_JAVA_HEAP_RETURN; | ||
| static oop init_shared_table(const DumpedInternedStrings* dumped_interned_strings) NOT_CDS_JAVA_HEAP_RETURN_(NULL); | ||
| static oop init_shared_table(const DumpedInternedStrings* dumped_interned_strings) NOT_CDS_JAVA_HEAP_RETURN_(nullptr); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| static void set_shared_strings_array_index(int root_index) NOT_CDS_JAVA_HEAP_RETURN; | ||
| static void serialize_shared_table_header(SerializeClosure* soc) NOT_CDS_JAVA_HEAP_RETURN; | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -90,7 +90,7 @@ class CompiledICInfo : public StackObj { | |
| Metadata* cached_metadata() const { assert(!_is_icholder, ""); return (Metadata*)_cached_value; } | ||
| CompiledICHolder* claim_cached_icholder() { | ||
| assert(_is_icholder, ""); | ||
| assert(_cached_value != nullptr, "must be non-nullptr"); | ||
| assert(_cached_value != nullptr, "must be non-null"); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| _release_icholder = false; | ||
| CompiledICHolder* icholder = (CompiledICHolder*)_cached_value; | ||
| icholder->claim(); | ||
|
|
@@ -339,7 +339,7 @@ class CompiledStaticCall : public ResourceObj { | |
| public: | ||
| // Code | ||
|
|
||
| // Returns NULL if CodeBuffer::expand fails | ||
| // Returns null if CodeBuffer::expand fails | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| static address emit_to_interp_stub(CodeBuffer &cbuf, address mark = nullptr); | ||
| static int to_interp_stub_size(); | ||
| static int to_trampoline_stub_size(); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -385,7 +385,7 @@ CompileTask* CompileQueue::get(CompilerThread* thread) { | |
| methodHandle save_hot_method; | ||
|
|
||
| MonitorLocker locker(MethodCompileQueue_lock); | ||
| // If _first is nullptr we have no more compile jobs. There are two reasons for | ||
| // If _first is null we have no more compile jobs. There are two reasons for | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| // having no compile jobs: First, we compiled everything we wanted. Second, | ||
| // we ran out of code cache so compilation has been disabled. In the latter | ||
| // case we perform code cache sweeps to free memory such that we can re-enable | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -239,7 +239,7 @@ oop XBarrier::load_barrier_on_phantom_oop_field_preloaded(volatile narrowOop* p, | |
|
|
||
| oop XBarrier::weak_load_barrier_on_oop_field_preloaded(volatile narrowOop* p, oop o) { | ||
| ShouldNotReachHere(); | ||
| return NULL; | ||
| return nullptr; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| } | ||
|
|
||
| oop XBarrier::weak_load_barrier_on_weak_oop_field_preloaded(volatile narrowOop* p, oop o) { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -184,7 +184,7 @@ inline bool XBarrierSet::AccessBarrier<decorators, BarrierSetT>::oop_arraycopy_i | |
| if (!HasDecorator<decorators, ARRAYCOPY_CHECKCAST>::value) { | ||
| // No check cast, bulk barrier and bulk copy | ||
| XBarrier::load_barrier_on_oop_array(src, length); | ||
| return Raw::oop_arraycopy_in_heap(nullptr, 0, src, NULL, 0, dst, length); | ||
| return Raw::oop_arraycopy_in_heap(nullptr, 0, src, nullptr, 0, dst, length); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| } | ||
|
|
||
| // Check cast and copy each elements | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,7 +40,7 @@ inline XPageTableIterator::XPageTableIterator(const XPageTable* page_table) : | |
|
|
||
| inline bool XPageTableIterator::next(XPage** page) { | ||
| for (XPage* entry; _iter.next(&entry);) { | ||
| if (entry != NULL && entry != _prev) { | ||
| if (entry != nullptr && entry != _prev) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| // Next page found | ||
| *page = _prev = entry; | ||
| return true; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -380,7 +380,7 @@ bool ZHeap::print_location(outputStream* st, zaddress addr) const { | |
| st->print(PTR_FORMAT " is a zaddress: ", untype(addr)); | ||
|
|
||
| if (addr == zaddress::null) { | ||
| st->print_raw_cr("NULL"); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd prefer if this were left as either NULL or null. |
||
| st->print_raw_cr("null"); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| return true; | ||
| } | ||
|
|
||
|
|
@@ -435,7 +435,7 @@ bool ZHeap::print_location(outputStream* st, zpointer ptr) const { | |
| const zaddress addr = ZPointer::uncolor(ptr); | ||
|
|
||
| if (addr == zaddress::null) { | ||
| st->print_raw_cr("NULL"); | ||
| st->print_raw_cr("null"); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| return true; | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -813,7 +813,7 @@ static void trace_method_resolution(const char* prefix, | |
| } | ||
| st->print("%s%s, compile-time-class:%s, method:%s, method_holder:%s, access_flags: ", | ||
| prefix, | ||
| (klass == nullptr ? "<nullptr>" : klass->internal_name()), | ||
| (klass == nullptr ? "<null>" : klass->internal_name()), | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| resolved_klass->internal_name(), | ||
| Method::name_and_sig_as_C_string(resolved_klass, | ||
| method->name(), | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -159,7 +159,7 @@ class JfrViewFlightRecordingDCmd : public JfrDCmd { | |
| return "Medium"; | ||
| } | ||
| static const JavaPermission permission() { | ||
| JavaPermission p = {"java.lang.management.ManagementPermission", "monitor", NULL}; | ||
| JavaPermission p = {"java.lang.management.ManagementPermission", "monitor", nullptr}; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| return p; | ||
| } | ||
| virtual const char* javaClass() const { | ||
|
|
@@ -184,7 +184,7 @@ class JfrQueryFlightRecordingDCmd : public JfrDCmd { | |
| return "Medium"; | ||
| } | ||
| static const JavaPermission permission() { | ||
| JavaPermission p = {"java.lang.management.ManagementPermission", "monitor", NULL}; | ||
| JavaPermission p = {"java.lang.management.ManagementPermission", "monitor", nullptr}; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| return p; | ||
| } | ||
| virtual const char* javaClass() const { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -122,7 +122,7 @@ const char* get_java_thread_name(const JavaThread* jt, int& length, oop vthread) | |
| name_str = java_lang_String::as_utf8_string(name, length); | ||
| } | ||
| } | ||
| assert(name_str != nullptr, "unexpected nullptr thread name"); | ||
| assert(name_str != nullptr, "unexpected null thread name"); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| return name_str; | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -144,7 +144,7 @@ void JfrRepository::set_chunk_path(jstring path, JavaThread* jt) { | |
| ResourceMark rm(jt); | ||
| const char* const canonical_chunk_path = JfrJavaSupport::c_str(path, jt); | ||
| if (nullptr == canonical_chunk_path && !_chunkwriter->is_valid()) { | ||
| // new output is nullptr and current output is null | ||
| // new output is null and current output is null | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| return; | ||
| } | ||
| instance().set_chunk_path(canonical_chunk_path); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -116,7 +116,7 @@ BufferPtr JfrStringPool::flush(BufferPtr old, size_t used, size_t requested, Thr | |
| migrate_outstanding_writes(old, new_buffer, used, requested); | ||
| } | ||
| release(old, thread); | ||
| return new_buffer; // might be nullptr | ||
| return new_buffer; // might be null | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| } | ||
|
|
||
| static const size_t lease_retry = 10; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -363,7 +363,7 @@ bool JVMCIEnv::pending_exception_as_string(const char** to_string, const char** | |
| if (!is_hotspot()) { | ||
| JNIAccessMark jni(this, THREAD); | ||
| jthrowable ex = jni()->ExceptionOccurred(); | ||
| if (ex != NULL) { | ||
| if (ex != nullptr) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| jni()->ExceptionClear(); | ||
| jobjectArray pair = (jobjectArray) jni()->CallStaticObjectMethod( | ||
| JNIJVMCI::HotSpotJVMCIRuntime::clazz(), | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -192,7 +192,7 @@ void AsyncLogWriter::initialize() { | |
| AsyncLogWriter* self = new AsyncLogWriter(); | ||
| if (self->_initialized) { | ||
| Atomic::release_store_fence(&AsyncLogWriter::_instance, self); | ||
| // All readers of _instance after the fence see non-nullptr. | ||
| // All readers of _instance after the fence see non-null. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| // We use LogOutputList's RCU counters to ensure all synchronous logsites have completed. | ||
| // After that, we start AsyncLog Thread and it exclusively takes over all logging I/O. | ||
| for (LogTagSet* ts = LogTagSet::first(); ts != nullptr; ts = ts->next()) { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -478,7 +478,7 @@ bool LogConfiguration::parse_log_arguments(const char* outputstr, | |
| const char* decoratorstr, | ||
| const char* output_options, | ||
| outputStream* errstream) { | ||
| assert(errstream != nullptr, "errstream can not be nullptr"); | ||
| assert(errstream != nullptr, "errstream can not be null"); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| if (outputstr == nullptr || strlen(outputstr) == 0) { | ||
| outputstr = "stdout"; | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -61,7 +61,7 @@ class LogConfiguration : public AllStatic { | |
| static size_t _n_listener_callbacks; | ||
| static bool _async_mode; | ||
|
|
||
| // Create a new output. Returns nullptr if failed. | ||
| // Create a new output. Returns null if failed. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| static LogOutput* new_output(const char* name, const char* options, outputStream* errstream); | ||
|
|
||
| // Add an output to the list of configured outputs. Returns the assigned index. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -109,7 +109,7 @@ class LogMessageBuffer : public StackObj { | |
| // It is, however, possible to specify a prefix per LogMessageBuffer, | ||
| // using set_prefix(). Lines added to the LogMessageBuffer after a prefix | ||
| // function has been set will be prefixed automatically. | ||
| // Setting this to nullptr will disable prefixing. | ||
| // Setting this to null will disable prefixing. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| void set_prefix(size_t (*prefix_fn)(char*, size_t)) { | ||
| _prefix_fn = prefix_fn; | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -100,7 +100,7 @@ class LogStream : public LogStreamImpl<LogTargetHandle> { | |
| LogStream(const LogTargetImpl<level, T0, T1, T2, T3, T4, GuardTag>& type_carrier) | ||
| : LogStreamImpl(LogTargetHandle(level, LogTagSetMapping<T0, T1, T2, T3, T4>::tagset())) {} | ||
|
|
||
| // Constructor to support creation from typed (likely nullptr) pointer. Mostly used by the logging framework. | ||
| // Constructor to support creation from typed (likely null) pointer. Mostly used by the logging framework. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| // | ||
| // LogStream stream(log.debug()); | ||
| // or | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -875,7 +875,7 @@ MetaWord* Metaspace::allocate(ClassLoaderData* loader_data, size_t word_size, | |
| assert(word_size <= Metaspace::max_allocation_word_size(), | ||
| "allocation size too large (" SIZE_FORMAT ")", word_size); | ||
|
|
||
| assert(loader_data != nullptr, "Should never pass around a nullptr loader_data. " | ||
| assert(loader_data != nullptr, "Should never pass around a null loader_data. " | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| "ClassLoaderData::the_null_class_loader_data() should have been used."); | ||
|
|
||
| // Deal with concurrent unloading failed allocation starvation | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -277,7 +277,7 @@ void Metachunk::verify() const { | |
| word_size(), committed_words()); | ||
|
|
||
| // Test base pointer | ||
| assert(base() != nullptr, "Base pointer nullptr"); | ||
| assert(base() != nullptr, "Base pointer null"); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| assert(vsnode() != nullptr, "No space"); | ||
| vsnode()->check_pointer(base()); | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -343,7 +343,7 @@ MetaWord* MetaspaceArena::allocate_inner(size_t requested_word_size) { | |
| SOMETIMES(verify_locked();) | ||
|
|
||
| if (p == nullptr) { | ||
| UL(info, "allocation failed, returned nullptr."); | ||
| UL(info, "allocation failed, returned null."); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| } else { | ||
| UL2(trace, "after allocation: %u chunk(s), current:" METACHUNK_FULL_FORMAT, | ||
| _chunks.count(), METACHUNK_FULL_FORMAT_ARGS(current_chunk())); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -466,7 +466,7 @@ void Universe::initialize_basic_type_mirrors(TRAPS) { | |
| for (int i = T_BOOLEAN; i < T_VOID+1; i++) { | ||
| if (!is_reference_type((BasicType)i)) { | ||
| oop m = _basic_type_mirrors[i].resolve(); | ||
| assert(m != nullptr, "archived mirrors should not be nullptr"); | ||
| assert(m != nullptr, "archived mirrors should not be null"); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| } | ||
| } | ||
| } else | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -595,7 +595,7 @@ void ReservedHeapSpace::initialize_compressed_heap(const size_t size, size_t ali | |
|
|
||
| // Last, desperate try without any placement. | ||
| if (_base == nullptr) { | ||
| log_trace(gc, heap, coops)("Trying to allocate at address nullptr heap of size " SIZE_FORMAT_X, size + noaccess_prefix); | ||
| log_trace(gc, heap, coops)("Trying to allocate at address null heap of size " SIZE_FORMAT_X, size + noaccess_prefix); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. T |
||
| initialize(size + noaccess_prefix, alignment, page_size, nullptr, false); | ||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
T