public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] PR29788, gprofng cannot display Java's generated assembly code
@ 2022-11-16  5:33 vladimir.mezentsev
  0 siblings, 0 replies; only message in thread
From: vladimir.mezentsev @ 2022-11-16  5:33 UTC (permalink / raw)
  To: binutils; +Cc: Vladimir Mezentsev

From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>

gprofng/ChangeLog
2022-11-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR gprofng/29788
	* src/Experiment.h: Declare dyntext_name.
	* src/Experiment.cc: Use dyntext_name to initialize img_fname.
---
 gprofng/src/Experiment.cc | 10 +++++-----
 gprofng/src/Experiment.h  |  3 ++-
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/gprofng/src/Experiment.cc b/gprofng/src/Experiment.cc
index 98aae9714ac..44de387f3d2 100644
--- a/gprofng/src/Experiment.cc
+++ b/gprofng/src/Experiment.cc
@@ -1370,6 +1370,7 @@ Experiment::Experiment ()
   expt_name = NULL;
   arch_name = NULL;
   fndr_arch_name = NULL;
+  dyntext_name = NULL;
   logFile = NULL;
 
   dataDscrs = new Vector<DataDescriptor*>;
@@ -1432,6 +1433,7 @@ Experiment::~Experiment ()
   free (expt_name);
   free (arch_name);
   free (fndr_arch_name);
+  free (dyntext_name);
   delete jthreads_idx;
   delete cstack;
   delete cstackShowHide;
@@ -6052,11 +6054,10 @@ Experiment::fetch_pprocq ()
 int
 Experiment::read_dyntext_file ()
 {
-  char *data_file_name = dbe_sprintf ("%s/%s", expt_name, SP_DYNTEXT_FILE);
-  Data_window *dwin = new Data_window (data_file_name);
+  dyntext_name = dbe_sprintf ("%s/%s", expt_name, SP_DYNTEXT_FILE);
+  Data_window *dwin = new Data_window (dyntext_name);
   if (dwin->not_opened ())
     {
-      free (data_file_name);
       delete dwin;
       return 1;
     }
@@ -6089,7 +6090,7 @@ Experiment::read_dyntext_file ()
 	case DT_CODE:
 	  if (fp)
 	    {
-	      fp->img_fname = data_file_name;
+	      fp->img_fname = dyntext_name;
 	      fp->img_offset = offset + sizeof (DT_common);
 	      if ((platform != Intel) && (platform != Amd64))
 		{ //ARCH(SPARC)
@@ -6178,7 +6179,6 @@ Experiment::read_dyntext_file ()
       offset += cpcktsize;
     }
   free (progress_msg);
-  free (data_file_name);
   delete dwin;
   return 0;
 }
diff --git a/gprofng/src/Experiment.h b/gprofng/src/Experiment.h
index 17c91bda23e..46abbc73d3d 100644
--- a/gprofng/src/Experiment.h
+++ b/gprofng/src/Experiment.h
@@ -434,7 +434,8 @@ protected:
   char *expt_name;      // name of experiment
   char *arch_name;      // <experiment>/archive
   char *fndr_arch_name; // <founder_experiment>/archive
-  //TBR? hrtime_t sample_time;  // total of sample durations
+  char *dyntext_name;   // <experiment>/dyntext
+
   int yyparse ();       // Allow yyparse actions to access
   Vaddr stack_base;     // Stack base
 
-- 
2.31.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-16  5:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-16  5:33 [PATCH] PR29788, gprofng cannot display Java's generated assembly code vladimir.mezentsev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).