Mercurial > hg > graal-jvmci-8
diff src/share/vm/prims/jvmtiEnv.cpp @ 2100:b1a2afa37ec4
7003271: Hotspot should track cumulative Java heap bytes allocated on a per-thread basis
Summary: Track allocated bytes in Thread's, update on TLAB retirement and direct allocation in Eden and tenured, add JNI methods for ThreadMXBean.
Reviewed-by: coleenp, kvn, dholmes, ysr
author | phh |
---|---|
date | Fri, 07 Jan 2011 10:42:32 -0500 |
parents | 09b4dd4f152b |
children | 3582bf76420e |
line wrap: on
line diff
--- a/src/share/vm/prims/jvmtiEnv.cpp Fri Jan 07 03:38:19 2011 -0800 +++ b/src/share/vm/prims/jvmtiEnv.cpp Fri Jan 07 10:42:32 2011 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1802,7 +1802,7 @@ // depth - pre-checked as non-negative // value - pre-checked for NULL jvmtiError -JvmtiEnv::GetLocalInstance(JavaThread* java_thread, jint depth, jobject* value){ +JvmtiEnv::GetLocalInstance(JavaThread* java_thread, jint depth, jobject* value_ptr){ JavaThread* current_thread = JavaThread::current(); // rm object is created to clean up the javaVFrame created in // doit_prologue(), but after doit() is finished with it. @@ -1814,7 +1814,7 @@ if (err != JVMTI_ERROR_NONE) { return err; } else { - *value = op.value().l; + *value_ptr = op.value().l; return JVMTI_ERROR_NONE; } } /* end GetLocalInstance */ @@ -3440,12 +3440,12 @@ // property - pre-checked for NULL // value - NULL is a valid value, must be checked jvmtiError -JvmtiEnv::SetSystemProperty(const char* property, const char* value) { +JvmtiEnv::SetSystemProperty(const char* property, const char* value_ptr) { jvmtiError err =JVMTI_ERROR_NOT_AVAILABLE; for (SystemProperty* p = Arguments::system_properties(); p != NULL; p = p->next()) { if (strcmp(property, p->key()) == 0) { - if (p->set_value((char *)value)) { + if (p->set_value((char *)value_ptr)) { err = JVMTI_ERROR_NONE; } }