IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 40780


Ignore:
Timestamp:
Jun 6, 2019, 10:59:30 AM (7 years ago)
Author:
eugene
Message:

add tools to search for kapa memory leaks

Location:
branches/eam_branches/ohana.20190329/src
Files:
2 added
10 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ohana.20190329/src/kapa2/Makefile

    r39401 r40780  
    4242$(SRC)/bDrawObjects.$(ARCH).o             $(SRC)/bDrawFrame.$(ARCH).o         \
    4343$(SRC)/bDrawLabels.$(ARCH).o              $(SRC)/bDrawIt.$(ARCH).o            \
    44 $(SRC)/bDrawImage.$(ARCH).o               \
     44$(SRC)/bDrawImage.$(ARCH).o               $(SRC)/MemoryDump.$(ARCH).o         \
    4545$(SRC)/PNGit.$(ARCH).o                    $(SRC)/PPMit.$(ARCH).o              \
    4646$(SRC)/PSit.$(ARCH).o                     $(SRC)/CrossHairs.$(ARCH).o         \
  • branches/eam_branches/ohana.20190329/src/kapa2/include/prototypes.h

    r40731 r40780  
    66int           EventLoop           PROTO((void));
    77void          CloseDisplay        PROTO((void));
     8int           MemoryDump          PROTO((int sock));
     9int           MemoryDumpLines     PROTO((int sock));
     10int           MemoryDumpOnExit    PROTO((int sock));
     11int           MemoryDumpSetOnExit PROTO((int state));
     12int           MemoryDumpAndExit   PROTO((void));
    813
    914/* SetUpGraphic */
  • branches/eam_branches/ohana.20190329/src/kapa2/src/CheckPipe.c

    r40731 r40780  
    358358  }
    359359
     360  if (!strcmp (word, "MEMD")) {
     361    MemoryDump (sock);
     362    KiiSendCommand (sock, 4, "DONE");
     363    FINISHED (TRUE);
     364  }
     365
     366  if (!strcmp (word, "MEML")) {
     367    MemoryDumpLines (sock);
     368    KiiSendCommand (sock, 4, "DONE");
     369    FINISHED (TRUE);
     370  }
     371
     372  if (!strcmp (word, "MEMX")) {
     373    MemoryDumpOnExit (sock);
     374    KiiSendCommand (sock, 4, "DONE");
     375    FINISHED (TRUE);
     376  }
     377
    360378  fprintf (stderr, "unknown signal %s\n", word);
    361379  KiiSendCommand (sock, 4, "DONE");
  • branches/eam_branches/ohana.20190329/src/kapa2/src/args.c

    r39225 r40780  
    2323    NAME_WINDOW = strcreate (argv[N]);
    2424    remove_argument(N, argc, argv);
     25  }
     26
     27  if ((N = get_argument (*argc, argv, "-memdump"))) {
     28    remove_argument(N, argc, argv);
     29    MemoryDumpSetOnExit (TRUE);
    2530  }
    2631
  • branches/eam_branches/ohana.20190329/src/kapa2/src/bDrawIt.c

    r40731 r40780  
    3636  // apply anti-aliasing only to the graph
    3737  if (graphic->smooth_sigma > 0.0) {
     38    // XXX getting a strange value
     39    graphic->smooth_sigma = MAX (graphic->smooth_sigma, 5.0);
    3840    bDrawSmooth (graph, graphic->smooth_sigma);
    3941  }
  • branches/eam_branches/ohana.20190329/src/kapa2/src/kapa.c

    r13479 r40780  
    1111
    1212  CloseDisplay ();
    13   exit (0);
     13  MemoryDumpAndExit ();
    1414}
  • branches/eam_branches/ohana.20190329/src/libkapa/include/kapa.h

    r40730 r40780  
    259259int KapaSetToolbox (int fd, int location);
    260260int KapaSetSmoothSigma (int fd, float sigma);
     261int KapaMemoryDump (int fd);
     262int KapaMemoryDumpLines (int fd, int Nlines);
     263int KapaMemoryDumpOnExit (int fd, int state);
    261264
    262265/* KapaColors */
  • branches/eam_branches/ohana.20190329/src/libkapa/src/KapaWindow.c

    r40730 r40780  
    462462  return (TRUE);
    463463}
     464
     465int KapaMemoryDump (int fd) {
     466
     467  KiiSendCommand (fd, 4, "MEMD");
     468  KiiWaitAnswer (fd, "DONE");
     469  return (TRUE);
     470}
     471
     472int KapaMemoryDumpLines (int fd, int Nlines) {
     473
     474  KiiSendCommand (fd, 4, "MEML");
     475  KiiSendMessage (fd, "%d ", Nlines);
     476  KiiWaitAnswer (fd, "DONE");
     477  return (TRUE);
     478}
     479
     480int KapaMemoryDumpOnExit (int fd, int state) {
     481
     482  KiiSendCommand (fd, 4, "MEMX");
     483  KiiSendMessage (fd, "%d ", state);
     484  KiiWaitAnswer (fd, "DONE");
     485  return (TRUE);
     486}
     487
  • branches/eam_branches/ohana.20190329/src/opihi/cmd.data/Makefile

    r40758 r40780  
    7979$(SRC)/join.$(ARCH).o           \
    8080$(SRC)/jpeg.$(ARCH).o           \
     81$(SRC)/kapamemory.$(ARCH).o             \
    8182$(SRC)/kern.$(ARCH).o           \
    8283$(SRC)/keyword.$(ARCH).o        \
  • branches/eam_branches/ohana.20190329/src/opihi/cmd.data/init.c

    r40758 r40780  
    6868int join             PROTO((int, char **));
    6969int jpeg             PROTO((int, char **));
     70int kapamemory       PROTO((int, char **));
    7071int kern             PROTO((int, char **));
    7172int keyword          PROTO((int, char **));
     
    264265  {1, "join",         join,             "find the join of two ID vectors"},
    265266  {1, "jpeg",         jpeg,             "convert display image to JPEG"},
     267  {1, "kapamemory",   kapamemory,       "manage kapa memory dump options"},
    266268  {1, "kern",         kern,             "convolve with 3x3 kernel"},
    267269  {1, "keyword",      keyword,          "extract a FITS keyword from image header"},
Note: See TracChangeset for help on using the changeset viewer.