1 /*
2 * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
314 while (--n >= 0) {
315 assert(e != NULL, "Not that many classpath entries.");
316 e = e->next();
317 }
318 return e;
319 }
320
321 #if INCLUDE_CDS
322 // Sharing dump and restore
323 static void copy_package_info_buckets(char** top, char* end);
324 static void copy_package_info_table(char** top, char* end);
325
326 static void check_shared_classpath(const char *path);
327 static void finalize_shared_paths_misc_info();
328 static int get_shared_paths_misc_info_size();
329 static void* get_shared_paths_misc_info();
330 static bool check_shared_paths_misc_info(void* info, int size);
331 static void exit_with_path_failure(const char* error, const char* message);
332 #endif
333
334 static void trace_class_path(outputStream* out, const char* msg, const char* name = NULL);
335
336 // VM monitoring and management support
337 static jlong classloader_time_ms();
338 static jlong class_method_total_size();
339 static jlong class_init_count();
340 static jlong class_init_time_ms();
341 static jlong class_verify_time_ms();
342 static jlong class_link_count();
343 static jlong class_link_time_ms();
344
345 // indicates if class path already contains a entry (exact match by name)
346 static bool contains_entry(ClassPathEntry* entry);
347
348 // adds a class path list
349 static void add_to_list(ClassPathEntry* new_entry);
350
351 // creates a class path zip entry (returns NULL if JAR file cannot be opened)
352 static ClassPathZipEntry* create_class_path_zip_entry(const char *apath);
353
354 // Debugging
|
1 /*
2 * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
314 while (--n >= 0) {
315 assert(e != NULL, "Not that many classpath entries.");
316 e = e->next();
317 }
318 return e;
319 }
320
321 #if INCLUDE_CDS
322 // Sharing dump and restore
323 static void copy_package_info_buckets(char** top, char* end);
324 static void copy_package_info_table(char** top, char* end);
325
326 static void check_shared_classpath(const char *path);
327 static void finalize_shared_paths_misc_info();
328 static int get_shared_paths_misc_info_size();
329 static void* get_shared_paths_misc_info();
330 static bool check_shared_paths_misc_info(void* info, int size);
331 static void exit_with_path_failure(const char* error, const char* message);
332 #endif
333
334 static void trace_class_path(const char* msg, const char* name = NULL);
335
336 // VM monitoring and management support
337 static jlong classloader_time_ms();
338 static jlong class_method_total_size();
339 static jlong class_init_count();
340 static jlong class_init_time_ms();
341 static jlong class_verify_time_ms();
342 static jlong class_link_count();
343 static jlong class_link_time_ms();
344
345 // indicates if class path already contains a entry (exact match by name)
346 static bool contains_entry(ClassPathEntry* entry);
347
348 // adds a class path list
349 static void add_to_list(ClassPathEntry* new_entry);
350
351 // creates a class path zip entry (returns NULL if JAR file cannot be opened)
352 static ClassPathZipEntry* create_class_path_zip_entry(const char *apath);
353
354 // Debugging
|