Skip to content

formal: Move data dir to CodeSamples/fomral/data

Akira Yokosawa perfbook 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2formal: Move formal/data to CodeSamples/formal/dataCodeSamples/formal/data/.gitignore CodeSamples/formal/data/RCU-test-ratio.eps CodeSamples/formal/data/plot.sh +2 more+2 -50 replies
2/2formal: Use symlink to .eps file under CodeSamples/formal/dataformal/RCU-test-ratio.eps formal/formal.tex+3 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH -perfbook 0/2] formal: Move data dir to CodeSamples/fomral/data

Hi Paul,

So this patch set moves formal/data and formal/RCU-test-ratio.eps to CodeSamples/formal/data.

Patch 1/2 does the movement.
Patch 2/2 puts symlink to the moved .eps file under formal/.

Actually, patch 2/2 is optional within the scope of this set. It presents an idea of organizing .eps files generated by gnuplot under CodeSamples/ so that redundant .eps -> .pdf conversions can be avoided.

Currently, I observe three ways to include gnuplot outputs.

1) Copy generated .eps files manually to the relevant chapter's subdirectory (after running the plot script).

2) Run a plot script under CodeSamples/ and the generated .eps files are automatically copied by commands in the script.

3) Use paths of .pdf versions of .eps files under CodeSamples/... as the argument to the \includegraphics{} macros (no copying involved).

Most recent plots are managed by 3).

However, to accommodate 3), a wildcard pattern in Makefile was extended to include deep subdirectories under CodeSamples/ (commit 57b442c02db3 "Makefile: Extend wildcard pattern to catch .eps files under CodeSamples").
So it now picks up a lot of unused older gnuplot plots, and causes redundant .eps -> .pdf conversions.

So, I suggest using symlink, e.g.,
formal/xxx.eps -> CodeSamples/formal/data/xxx.eps, and remove CodeSamples/ from the wildcard pattern in Makefile.

That is, if it is OK to use symlink as in patch 2/2.

Another advantage of this idea is that it would be easier to find out where a particular gnuplot image is originated.

By copying .eps files from CodeSamples/... to other directories, you lose such origin info. This won't be a issue if there is a single .eps file of the same name under CodeSamples/, but this is not always the case.

Symlinks can retain their origins.

So, for example, when Zhouyi changed "rcu" to "RCU" in gnuplot generated plots (commit 2a2ca773005f "Change trace labels from "rcu" to "RCU""), he could have find out which scripts need updates more easily.

As a matter of fact, he failed to update .eps files under CodeSamples/. For example:

    $ diff -u CodeSamples/defer/data/rcuscale.hps.2020.05.28a/refRCUperfPREEMPT.eps defer/refRCUperfPREEMPT.eps
    --- CodeSamples/defer/data/rcuscale.hps.2020.05.28a/refRCUperfPREEMPT.eps	2021-08-12 13:48:28.580153786 +0900
    +++ defer/refRCUperfPREEMPT.eps	2021-08-17 13:14:58.114517535 +0900
    @@ -2209,7 +2209,7 @@
     1.000 UP
     LCb setrgbcolor
     1729 1458 M
    -[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 (rcu)]
    +[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 (RCU)]
     ] -33.3 MLshow
     LCb setrgbcolor
     1066 2212 M

If Patch 2/2 looks good to you, I'll do the changes along this idea and update the wildcard pattern in Makefile.

Thanks, Akira
--
Akira Yokosawa (2):
formal: Move formal/data to CodeSamples/formal/data
formal: Use symlink to .eps file under CodeSamples/formal/data

 .../formal}/data/.gitignore                   |    1 -
 CodeSamples/formal/data/RCU-test-ratio.eps    | 4370 ++++++++++++++++
 {formal => CodeSamples/formal}/data/plot.sh   |    2 -
 .../formal}/data/rcu-test.dat                 |    0
 formal/RCU-test-ratio.eps                     | 4371 +----------------
 5 files changed, 4371 insertions(+), 4373 deletions(-)
 rename {formal => CodeSamples/formal}/data/.gitignore (50%)
 create mode 100644 CodeSamples/formal/data/RCU-test-ratio.eps
 rename {formal => CodeSamples/formal}/data/plot.sh (96%)
 rename {formal => CodeSamples/formal}/data/rcu-test.dat (100%)
 mode change 100644 => 120000 formal/RCU-test-ratio.eps
Signature · 1 line
2.17.1