add prof sigusr1 feature, tweak amdgup tooltip, fix colorpicker handle_new_color...
authorGood Guy <good1.2guy@gmail.com>
Thu, 4 Jul 2019 21:25:58 +0000 (15:25 -0600)
committerGood Guy <good1.2guy@gmail.com>
Thu, 4 Jul 2019 21:25:58 +0000 (15:25 -0600)
cinelerra-5.1/cinelerra/colorpicker.C
cinelerra-5.1/cinelerra/performanceprefs.C
cinelerra-5.1/prof2/prof.c
cinelerra-5.1/prof2/profile.c

index 9a995958c27377fd0c3a1762ddb5af763ea831e4..72efa4a69fff306cda3519d97c647d7ad6e63f83 100644 (file)
@@ -1275,8 +1275,10 @@ void ColorButtonPicker::update(int color, int alpha)
 
 int ColorButtonPicker::handle_new_color(int color, int alpha)
 {
 
 int ColorButtonPicker::handle_new_color(int color, int alpha)
 {
-       update(color, alpha);
-       return 1;
+       color_button->lock_window("ColorButtonPicker::handle_new_color");
+       color_button->update_gui(color, alpha);
+       color_button->unlock_window();
+       return color_button->handle_new_color(color, alpha);
 }
 
 void ColorButtonPicker::update_gui()
 }
 
 void ColorButtonPicker::update_gui()
index dbeee00423c53e83f48f7b296f2e91a7c526eade..687e7e482a4bbe0a4e5f94cb07bc07f70a296086 100644 (file)
@@ -333,7 +333,7 @@ void PrefsUseHWDev::create_objects()
 {
        BC_PopupTextBox::create_objects();
        set_tooltip(_("vdpau - Nvidia, Nouveau\n"
 {
        BC_PopupTextBox::create_objects();
        set_tooltip(_("vdpau - Nvidia, Nouveau\n"
-               "vaapi - Broadcom, Intel HD graphics, Amdgup, Radeon\n"
+               "vaapi - Broadcom, Intel HD graphics, Amdgpu, Radeon\n"
                "cuda  - Nvidia + Cuda SDK"));
        hw_dev_names.append(new BC_ListBoxItem(_("none")));
 #ifdef HAVE_VAAPI
                "cuda  - Nvidia + Cuda SDK"));
        hw_dev_names.append(new BC_ListBoxItem(_("none")));
 #ifdef HAVE_VAAPI
index 35af38102da3c2d2f427c5d18568db45ddd3f755..d9b6c23e96ae439552d61652c2691270f26b7748 100644 (file)
@@ -545,6 +545,7 @@ usage(char *av0)
    fprintf(stderr,"  -1  usr only cpu timer intervals (sigvtalrm)\n");
    fprintf(stderr,"  -2  real time timer intervals (sigalrm)\n");
    fprintf(stderr,"  -u  profile timer interval in usecs\n");
    fprintf(stderr,"  -1  usr only cpu timer intervals (sigvtalrm)\n");
    fprintf(stderr,"  -2  real time timer intervals (sigalrm)\n");
    fprintf(stderr,"  -u  profile timer interval in usecs\n");
+   fprintf(stderr," use: kill -USR1 <pid> to report, rescan and restart\n");
 }
 
 long run_to_breakpoint(pid_t ppid, int init_syscall)
 }
 
 long run_to_breakpoint(pid_t ppid, int init_syscall)
@@ -746,6 +747,7 @@ int main(int ac, char **av)
       exit(1);
    }
 
       exit(1);
    }
 
+   printf("prof pid = %d\n", pid);
    execve = sizeof(sysreq_name)/sizeof(sysreq_name[0]);
    while( --execve >= 0 && strcmp("execve",sysreq_name[execve]) );
    if( execve < 0 ) {
    execve = sizeof(sysreq_name)/sizeof(sysreq_name[0]);
    while( --execve >= 0 && strcmp("execve",sysreq_name[execve]) );
    if( execve < 0 ) {
index 6103b5334a10b3a4d6fe6aba13a6484b849ada25..dd3bf7e0963ed6741f22d65f3fdbd88855e015a6 100644 (file)
@@ -526,7 +526,7 @@ static int readNmMaps(unsigned long fwa)
          }
       }
       dprintf(stderr,", %d symbols\n",tsym->n - n);
          }
       }
       dprintf(stderr,", %d symbols\n",tsym->n - n);
-      if( mod < 0 ) {
+      if( mod < 0 && strncmp("linux-vdso.so.",nm,14) ) {
          fprintf(stderr,"profile - Cannot map module - %s\n",nm);
 //         exit(1);
 //         return -1;
          fprintf(stderr,"profile - Cannot map module - %s\n",nm);
 //         exit(1);
 //         return -1;
@@ -708,6 +708,14 @@ void profileStart(void)
    dprintf(stderr,"starting profile.\n");
 }
 
    dprintf(stderr,"starting profile.\n");
 }
 
+static void sigusr1(int n)
+{
+   profileStop();
+   profileShow();
+   delAllTbls();
+   profileStart();
+}
+
 int profileMain(int ac,char **av,char **ev)
 {
    int (*fmain)(int ac,char **av,char **ev);
 int profileMain(int ac,char **av,char **ev)
 {
    int (*fmain)(int ac,char **av,char **ev);
@@ -718,6 +726,7 @@ int profileMain(int ac,char **av,char **ev)
      exit(1);
    }
    atexit(profileExit);
      exit(1);
    }
    atexit(profileExit);
+   signal(SIGUSR1, sigusr1);
    fmain = (int (*)(int,char **,char **))adr;
    dprintf(stderr,"starting \"main\" at: %p\n",fmain);
    int ret = fmain(ac,av,ev);
    fmain = (int (*)(int,char **,char **))adr;
    dprintf(stderr,"starting \"main\" at: %p\n",fmain);
    int ret = fmain(ac,av,ev);