94 nanos = 500 + (int) (500.0 * (rand() / (RAND_MAX + 1.0)));
106 for (t = ThreadList_first(); t != NULL; t = ThreadList_next(t)) {
115 pthread_kill(t->
impl.
tid, SIGUSR2);
147 if (code->frequency > 500) {
200 return (m1->
code->frequency > m2->
code->frequency);
227 std::list<methodinfo*> l;
235 for (; nmen; nmen = nmen->
hashlink) {
238 for (clsen = nmen->
classes; clsen; clsen = clsen->
next) {
253 if ((code != NULL) && (code->frequency > 0)) {
256 frequency += code->frequency;
257 cycles += code->cycles;
274 printf(
" frequency ratio cycles ratio method name\n");
275 printf(
"----------- --------- -------------- --------- -------------\n");
284 printf(
"%10d %.5f %12ld %.5f ",
286 (
double) code->frequency / (
double) frequency,
288 (
double) code->cycles / (
double) cycles);
295 for (j = 0; j < code->basicblockcount; j++)
297 j, code->bbfrequency[j]);
301 printf(
"----------- -------------- \n");
302 printf(
"%10d %12ld\n", frequency, (
long) cycles);
jlong jlong jlong jlong jint jmethodID jint slot
classcache_class_entry * next
static bool profile_compare_frequency(methodinfo *m1, methodinfo *m2)
Comparison function used to sort a method list from higher to lower by comparing the method call freq...
bool threads_thread_start_internal(Utf8String name, functionptr f)
hashtable hashtable_classcache
JNIEnv jclass jobject const char * name
cacao::detail::threadobject impl
static ThreadList * get()
Provides access to singleton.
classcache_class_entry * classes
void method_println(methodinfo *m)
static void profile_thread(void)
void profile_printstats(void)
Prints profiling statistics gathered during runtime.
void * methodtree_find_nocheck(void *pc)
static Utf8String from_utf8(const char *, size_t)
bool profile_start_thread(void)
List implementation with dump memory.
classcache_name_entry * hashlink
void threads_sleep(int64_t millis, int32_t nanos)
void Recompiler_queue_method(methodinfo *m)