8146115 - Improve docker container detection and resource configuration usage
Hohensee, Paul
hohensee at amazon.com
Wed Sep 27 21:54:22 UTC 2017
I’ve filed https://bugs.openjdk.java.net/browse/JDK-8188068 to fix the getter method name problem and assigned it to myself.
Thanks,
Paul
On 9/27/17, 1:22 PM, "Bob Vandette" <bob.vandette at oracle.com> wrote:
I don’t have a problem with following the approved style.
Whenever I’m adding new code in a large body of code I usually look around and try to adapt to
the norm assuming that others that came before me were properly reviewed for style conformance.
I assumed that the style guide had been updated but didn’t check.
I’ll just point out that there are many many offenders that have been in the source tree a looong time.
Since I am more or less extending the os class, I followed os.hpp’s lead.
os.hpp: static const char* get_temp_directory();
os.hpp: static const char* get_current_directory(char *buf, size_t buflen);
os.hpp: static int get_loaded_modules_info(LoadedModulesCallbackFunc callback, void *param);
os.hpp: static void* get_default_process_handle();
os.hpp: static bool get_host_name(char* buf, size_t buflen);
os.hpp: static int get_last_error();
os.hpp: static frame get_sender_for_C_frame(frame *fr);
os.hpp: static int get_signal_number(const char* signal_name);
os.hpp: static int get_native_stack(address* stack, int size, int toSkip = 0);
Here are a few more examples:
thread.hpp: const char* get_thread_name() const;
thread.hpp: const char* get_thread_name_string(char* buf = NULL, int buflen = 0) const;
thread.hpp: const char* get_threadgroup_name() const;
thread.hpp: const char* get_parent_name() const;
sharedRuntime.hpp: static address get_handle_wrong_method_stub() {
sharedRuntime.hpp: static address get_handle_wrong_method_abstract_stub() {
sharedRuntime.hpp: static address get_resolve_opt_virtual_call_stub() {
sharedRuntime.hpp: static address get_resolve_virtual_call_stub() {
threadService.hpp: static jlong get_total_thread_count() { return _total_threads_count->get_value(); }
threadService.hpp: static jlong get_peak_thread_count() { return _peak_threads_count->get_value(); }
threadService.hpp: static jlong get_live_thread_count() { return _live_threads_count->get_value() - _exiting_threads_count; }
threadService.hpp: static jlong get_daemon_thread_count() { return _daemon_threads_count->get_value() - _exiting_daemon_threads_count; }
memoryService.hpp: static MemoryPool* get_memory_pool(instanceHandle pool);
memoryService.hpp: static MemoryManager* get_memory_manager(instanceHandle mgr);
memoryService.hpp: static MemoryPool* get_memory_pool(int index) {
memoryService.hpp: static MemoryManager* get_memory_manager(int index) {
memoryService.hpp: static bool get_verbose() { return log_is_enabled(Info, gc); }
memoryService.hpp: static const GCMemoryManager* get_minor_gc_manager() {
memoryService.hpp: static const GCMemoryManager* get_major_gc_manager() {
memTracker.cpp: return MallocTracker::get_base(memblock);
memTracker.hpp: static inline Tracker get_virtual_memory_uncommit_tracker() { return Tracker(); }
memTracker.hpp: static inline Tracker get_virtual_memory_release_tracker() { return Tracker(); }
memTracker.hpp: return MallocTracker::get_header_size(memblock);
memTracker.hpp: static inline Tracker get_virtual_memory_uncommit_tracker() {
memTracker.hpp: static inline Tracker get_virtual_memory_release_tracker() {
memTracker.hpp: static inline MemBaseline& get_baseline() {
I’ll update my changes,
Bob.
> On Sep 27, 2017, at 4:05 PM, John Rose <john.r.rose at oracle.com> wrote:
>
> "There are counter examples to the prevailing style" does not lead to "therefore I can diverge from the prevailing style whenever I want." You need another reason, such as "I'm modifying an API where an alternative style is the local norm" or "these identifiers gain special value from their special style."
>
> – John
>
> On Sep 27, 2017, at 12:59 PM, Hohensee, Paul <hohensee at amazon.com> wrote:
>
>>> Getters in Hotspot don’t have “get_” prefixes (at least, they never used to!), so replace “get_container_type” with “container_type” and “pd_get_container_type” with “pd_container_type”.
>>
>> There are many examples of get_xxx in hotspot now.
>
More information about the hotspot-dev
mailing list