From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2041) id 38E6D3858CDB; Thu, 18 Aug 2022 18:21:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 38E6D3858CDB Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Vladimir Mezentsev To: bfd-cvs@sourceware.org, gdb-cvs@sourceware.org Subject: [binutils-gdb] gprofng: fix bug 29479 Collection fails when built without java support X-Act-Checkin: binutils-gdb X-Git-Author: Vladimir Mezentsev X-Git-Refname: refs/heads/master X-Git-Oldrev: bde195b84a862f31ac111c0881ad13b89ee89492 X-Git-Newrev: 49ddd814ac1071af7c4f45d5f8398b91862f2c7f Message-Id: <20220818182127.38E6D3858CDB@sourceware.org> Date: Thu, 18 Aug 2022 18:21:27 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Aug 2022 18:21:27 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D49ddd814ac10= 71af7c4f45d5f8398b91862f2c7f commit 49ddd814ac1071af7c4f45d5f8398b91862f2c7f Author: Vladimir Mezentsev Date: Wed Aug 17 19:55:23 2022 -0700 gprofng: fix bug 29479 Collection fails when built without java support =20 gprofng/ChangeLog 2022-08-17 Vladimir Mezentsev =20 PR gprofng/29479 * libcollector/collector.c: Add #if defined(GPROFNG_JAVA_PROFIL= ING) for java specific code. * libcollector/unwind.c: Likewise. Diff: --- gprofng/libcollector/collector.c | 2 ++ gprofng/libcollector/unwind.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/gprofng/libcollector/collector.c b/gprofng/libcollector/collec= tor.c index 93c9d3330de..ceff2c1cacc 100644 --- a/gprofng/libcollector/collector.c +++ b/gprofng/libcollector/collector.c @@ -913,8 +913,10 @@ __collector_open_experiment (const char *exp, const ch= ar *params, sp_origin_t or __collector_ext_unwind_key_init (1, NULL); =20 /* start java attach if suitable */ +#if defined(GPROFNG_JAVA_PROFILING) if (exp_origin =3D=3D SP_ORIGIN_DBX_ATTACH) __collector_jprofile_start_attach (); +#endif start_sec_time =3D CALL_UTIL (time)(NULL); __collector_start_time =3D collector_interface.getHiResTime (); TprintfT (DBG_LT0, "\t__collector_open_experiment; resetting start_time\= n"); diff --git a/gprofng/libcollector/unwind.c b/gprofng/libcollector/unwind.c index 11924378802..f8e11823c81 100644 --- a/gprofng/libcollector/unwind.c +++ b/gprofng/libcollector/unwind.c @@ -557,6 +557,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void= *arg) int size =3D max_frame_size; =20 #define MIN(a,b) ((a)<(b)?(a):(b)) +#if defined(GPROFNG_JAVA_PROFILING) /* get Java info */ if (__collector_java_mode && __collector_java_asyncgetcalltrace_loaded &= & context && !pseudo_context) { @@ -569,6 +570,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void= *arg) size -=3D sz; } } +#endif =20 /* get native stack */ if (context)