📄 nupshot.tcl
字号:
#!/usr/local/tcl/bin/wish -f## Upshot - parallel program performance analysis tool## Ed Karrels# Argonne National Laboratory# karrels@mcs.anl.gov#set defaultFile ~/.upshotrcproc SetGlobalVars {} { global tcl_precision programName progName set programName "Nupshot" set progName nupshot set tcl_precision 17}proc SetDefaults {} { option add *Entry.Relief sunken option add *Scrollbar.Relief sunken option add *Menubutton.Relief raised if {[option get . font Font] == ""} { option add *font -Adobe-Helvetica-Bold-R-Normal--*-120-* } # wishful thinking # option add *Canvas.Font [option get . font Font] 30}proc ProcessCmdLineArgs {} { global argv bw logFileName foreach parameter $argv { if {$parameter == "-bw" } { #black and white screen set bw 1 } elseif {$parameter == "-c" } { #color screen set bw 0 } else { if [file exists $parameter] { set logFileName $parameter } } }}proc SigDigits {num start end ninterest {factor 1}} { # ninterest is the number of interesting digits to leave if {!($end-$start)} { set ndigits 0 } else { set ndigits [expr int($ninterest-log10($end*$factor-$start*$factor))] } if {$ndigits<0} {set ndigits 0} return [format [format "%%.%df" $ndigits] [expr $num*$factor]]}#proc LogFormatError {filename line lineNo} {# puts "Logfile format error in line $lineNo of $filename:\n$line\n\n"#}proc GuessFormat {filename} { if [regexp {.log$} $filename] { return alog } elseif [regexp {.trf$} $filename] { return picl_1 } else { return [GetDefault logfileformat alog] }}proc RegisterDisplays {} { # In this procedure, register any displays that will be used with # Upshot. Display_Init Display_Register Timelines timeline Display_Register "Mountain Ranges" mtn}# progdir should have been defined by nupshot.csource $progdir/common.tclsource $progdir/entries.tclsource $progdir/fileselect.tclsource $progdir/zoom.tclsource $progdir/mainwin.tclsource $progdir/timelines.tclsource $progdir/mtn.tclsource $progdir/legend.tclsource $progdir/procnums.tclsource $progdir/hist.tclsource $progdir/print.tclsource $progdir/print_mainwin.tclsource $progdir/print_hist.tclsource $progdir/copy_canvas.tclsource $progdir/trim_canvas.tclsource $progdir/color.tclsource $progdir/displays.tclif 0 {source optionswin.tclsource timelinewin.tclsource lists.tclsource readaloglog.tclsource readpicllog.tclsource gatherevt.tclsource scales.tclsource pctdone.tcl}SetDefaultsSetGlobalVarsProcessCmdLineArgsEntryBindingsRegisterDisplays # Creating windows within the main window is always a pain because # the main window is just ".", so you can't add windows named ".x", # ".y" to it, unlike any other window. So, how's this for a fix:frame .fpack .f -expand 1 -fill both # open main windowif [info exists logFileName] { NewWin .f 1 $logFileName} else { NewWin .f 1}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -