From: Good Guy Date: Thu, 4 Jul 2019 21:25:58 +0000 (-0600) Subject: add prof sigusr1 feature, tweak amdgup tooltip, fix colorpicker handle_new_color... X-Git-Tag: 2019-08~23 X-Git-Url: https://cinelerra-gg.org/git/?a=commitdiff_plain;h=f41ee8a0f00338fffb7fd6760a5ecd04c0101a41;p=goodguy%2Fcinelerra.git add prof sigusr1 feature, tweak amdgup tooltip, fix colorpicker handle_new_color callback --- diff --git a/cinelerra-5.1/cinelerra/colorpicker.C b/cinelerra-5.1/cinelerra/colorpicker.C index 9a995958..72efa4a6 100644 --- a/cinelerra-5.1/cinelerra/colorpicker.C +++ b/cinelerra-5.1/cinelerra/colorpicker.C @@ -1275,8 +1275,10 @@ void ColorButtonPicker::update(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() diff --git a/cinelerra-5.1/cinelerra/performanceprefs.C b/cinelerra-5.1/cinelerra/performanceprefs.C index dbeee004..687e7e48 100644 --- a/cinelerra-5.1/cinelerra/performanceprefs.C +++ b/cinelerra-5.1/cinelerra/performanceprefs.C @@ -333,7 +333,7 @@ void PrefsUseHWDev::create_objects() { 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 diff --git a/cinelerra-5.1/prof2/prof.c b/cinelerra-5.1/prof2/prof.c index 35af3810..d9b6c23e 100644 --- a/cinelerra-5.1/prof2/prof.c +++ b/cinelerra-5.1/prof2/prof.c @@ -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," use: kill -USR1 to report, rescan and restart\n"); } long run_to_breakpoint(pid_t ppid, int init_syscall) @@ -746,6 +747,7 @@ int main(int ac, char **av) 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 ) { diff --git a/cinelerra-5.1/prof2/profile.c b/cinelerra-5.1/prof2/profile.c index 6103b533..dd3bf7e0 100644 --- a/cinelerra-5.1/prof2/profile.c +++ b/cinelerra-5.1/prof2/profile.c @@ -526,7 +526,7 @@ static int readNmMaps(unsigned long fwa) } } 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; @@ -708,6 +708,14 @@ void profileStart(void) 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); @@ -718,6 +726,7 @@ int profileMain(int ac,char **av,char **ev) 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);