jvmti_agent.c (664b0bae0b87f69bc9deb098f5e0158b9cf18e04) jvmti_agent.c (a09603f851045b031e990d2d663958ccb49db525)
1/*
2 * jvmti_agent.c: JVMTI agent interface
3 *
4 * Adapted from the Oprofile code in opagent.c:
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.

--- 21 unchanged lines hidden (view full) ---

30#include <stdint.h>
31#include <limits.h>
32#include <fcntl.h>
33#include <unistd.h>
34#include <time.h>
35#include <sys/mman.h>
36#include <syscall.h> /* for gettid() */
37#include <err.h>
1/*
2 * jvmti_agent.c: JVMTI agent interface
3 *
4 * Adapted from the Oprofile code in opagent.c:
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.

--- 21 unchanged lines hidden (view full) ---

30#include <stdint.h>
31#include <limits.h>
32#include <fcntl.h>
33#include <unistd.h>
34#include <time.h>
35#include <sys/mman.h>
36#include <syscall.h> /* for gettid() */
37#include <err.h>
38#include <linux/kernel.h>
38
39#include "jvmti_agent.h"
40#include "../util/jitdump.h"
41
42#define JIT_LANG "java"
43
44static char jit_path[PATH_MAX];
45static void *marker_addr;

--- 198 unchanged lines hidden (view full) ---

244
245 memset(&header, 0, sizeof(header));
246
247 debug_cache_init();
248
249 /*
250 * jitdump file name
251 */
39
40#include "jvmti_agent.h"
41#include "../util/jitdump.h"
42
43#define JIT_LANG "java"
44
45static char jit_path[PATH_MAX];
46static void *marker_addr;

--- 198 unchanged lines hidden (view full) ---

245
246 memset(&header, 0, sizeof(header));
247
248 debug_cache_init();
249
250 /*
251 * jitdump file name
252 */
252 snprintf(dump_path, PATH_MAX, "%s/jit-%i.dump", jit_path, getpid());
253 scnprintf(dump_path, PATH_MAX, "%s/jit-%i.dump", jit_path, getpid());
253
254 fd = open(dump_path, O_CREAT|O_TRUNC|O_RDWR, 0666);
255 if (fd == -1)
256 return NULL;
257
258 /*
259 * create perf.data maker for the jitdump file
260 */

--- 206 unchanged lines hidden ---
254
255 fd = open(dump_path, O_CREAT|O_TRUNC|O_RDWR, 0666);
256 if (fd == -1)
257 return NULL;
258
259 /*
260 * create perf.data maker for the jitdump file
261 */

--- 206 unchanged lines hidden ---